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

No option to disable resampling or set to nearest neighbor #75

Open
etzabo opened this issue Aug 30, 2022 · 3 comments
Open

No option to disable resampling or set to nearest neighbor #75

etzabo opened this issue Aug 30, 2022 · 3 comments

Comments

@etzabo
Copy link

etzabo commented Aug 30, 2022

I really want a nice, crisp view when zooming in to my map. The current upscaling of images really makes it feel awkward, like it's adding complexity to something that doesn't need it. Disabling resampling could really add to the aesthetic, looking more like vanilla maps.

@jpenilla
Copy link
Owner

I'm struggling to understand what you're talking about, but assuming you mean when zooming out and not in, then the method used is the same as vanilla. There's other methods that could be applied that would look different, however again the current zoom out method is the vanilla one, and when fully zoomed in each block is one pixel, no "resampling" or similar is applied, so I am still confused about what you mean.

@etzabo
Copy link
Author

etzabo commented Aug 30, 2022

I'm struggling to understand what you're talking about, but assuming you mean when zooming out and not in, then the method used is the same as vanilla. There's other methods that could be applied that would look different, however again the current zoom out method is the vanilla one, and when fully zoomed in each block is one pixel, no "resampling" or similar is applied, so I am still confused about what you mean.

Screenshot 2022-08-30 at 7 56 18 AM

In this image, you can see the blur created between two pixels in each image, which is absent between tiles. This creates a "crease" in the middle, making the images together look awkward, and creating blur in something that shouldn't have it. I'm pretty sure there's systems that could allow you to disable this automatic resampling done by browsers using something in HTML, similar to how pixel art is made to look normal on websites even in low resolution.

In short, I understand there's no resampling. I know each block is represented as a single pixel on the tile image, but browsers automatically resample images and make them look awkward.

@jpenilla
Copy link
Owner

What browser are you using? I can't reproduce anything similar looking on Firefox or Chrome, and the CSS is already set to use "pixelated"/not resampled rendering: https://github.com/jpenilla/squaremap/blob/master/common/src/main/resources/web/css/styles.css#L20-L21

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

2 participants