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

Improved rendering quality of the minimap #1431

Closed
wants to merge 1 commit into from

Conversation

gogoalex
Copy link

No description provided.

@bjorn
Copy link
Member

bjorn commented Jan 12, 2017

While this definitely looks much better, it's not an acceptable change. You're allocating an image the size of the map, which could easily take a huge amount of memory for large maps.

Maybe the quality could be improved by rendering the image at say twice the size of the minimap, and scaling it down from there.

@gogoalex
Copy link
Author

gogoalex commented Jan 12, 2017

While this definitely looks much better, it's not an acceptable change. You're allocating an image the size of the map, which could easily take a huge amount of memory for large maps.

Maybe the quality could be improved by rendering the image at say twice the size of the minimap, and scaling it down from there.

You're right.
Then we have to dig into the implementation of the current map renderer. It's buggy when rendering into a small size image.
If the minimap window is small enough, the display can be terribly wrong like this.
before

@kheftel-old
Copy link

Looks like it's possibly using nearest neighbor when drawing the minimap - as the minimap shrinks, each tile is represented by not an average of the pixels in the tile, but a couple discrete pixels picked from the tile. If the tile has high contrast, you can easily end up with the selected pixels not looking very much like the tile as a whole. A solution could be to use a resampling mode like bilinear interpolation in the drawing of the minimap.

(disclaimer: I have not looked at the pull request, nor do I know very well how tiled's code works, I'm just going off of the images and my own experience with the minimap. If I'm off base feel free to disregard).

@bjorn bjorn changed the title Fix minimap display Improved rendering quality of the minimap Sep 4, 2019
@bjorn bjorn closed this in a14c3f4 Mar 11, 2022
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.

None yet

3 participants