Fix single-tile export: scale tile instead of cropping in canvas stit… by jacksonTerror · Pull Request #29 · replicate/tilemaker · GitHub
Skip to content

Fix single-tile export: scale tile instead of cropping in canvas stit…#29

Merged
zeke merged 1 commit into
replicate:mainfrom
jacksonTerror:fix/single-tile-scaling
Aug 25, 2025
Merged

Fix single-tile export: scale tile instead of cropping in canvas stit…#29
zeke merged 1 commit into
replicate:mainfrom
jacksonTerror:fix/single-tile-scaling

Conversation

@jacksonTerror

Copy link
Copy Markdown
Contributor

…ch (resolves #26)

@vercel

vercel Bot commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

@jacksonTerror

Copy link
Copy Markdown
Contributor Author

Fixes the “single tile” download exporting a cropped quadrant of a 512×512 tile.
Root cause: canvas stitch used hardcoded 512 draw/step, so exporting 256×256 drew the source at 512 and advanced by 512, effectively cropping instead of scaling.
Change: stitchImages() now draws the full source tile and scales to an optional tileSize for the download; 256×256 export passes 256.
Other downloads remain unchanged.

Result: 256×256 single-tile export now tiles seamlessly (matches the preview). No impact to preview grid or larger wallpaper exports.

File touched: pages/index.js only.

Reference: fixes #26.

Thanks for maintaining TileMaker! I love this app. Sometimes I just come here to think of things and see how they tile, it's relaxing!

@vercel

vercel Bot commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
tilemaker Ready Ready Preview Comment Aug 25, 2025 3:43pm

@zeke

zeke commented Aug 25, 2025

Copy link
Copy Markdown
Member

Thanks for the PR!

Let's ship this an see how it goes.

@zeke zeke merged commit b9754e9 into replicate:main Aug 25, 2025
3 checks passed
@jacksonTerror

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Truncated export size on single tile mode

2 participants