Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip artifacts at low zoom #4

Open
kylebarron opened this issue May 7, 2020 · 1 comment
Open

Clip artifacts at low zoom #4

kylebarron opened this issue May 7, 2020 · 1 comment

Comments

@kylebarron
Copy link
Owner

kylebarron commented May 7, 2020

You could try math.ceil and math.floor instead of round here:

left = round(buffers[0] / crs_width * img_width)
bottom = img_height - round(buffers[1] / crs_height * img_height)
right = img_width - round(buffers[2] / crs_width * img_width)
top = round(buffers[3] / crs_height * img_height)

That would slightly overcompensate, but then the gaps would be white, instead of whatever the background color is.
image

@kylebarron
Copy link
Owner Author

Helped with 8cc581d, which removed the rounding. But there's still some artifacts. I'm not sure I want to round up, since that could add white borders where the tile junction is even. For now this is fine.

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

No branches or pull requests

1 participant