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
With version 7, the WMS image gets blurry in many cases #14718
Comments
The image will be drawn at a fractional pixel position on the layer canvas, so some blurring is to be expected unless interpolation is disabled (which would have the same effect as offsetting the drawn image to an integer pixel position - pixel perfect but in slightly wrong position). |
I understand that, but why don't create a WMS query do not have fractional pixel (I hope that a pull request will be accepted :-) ) |
I think it is the calculation of the size that is at fault, it should be an integer value greater than the view size on both sides e.g instead of
use
and similarly for |
Looks good, thanks, I will try with it :-) |
There could still be a problem if the map center is changed, but no image update is needed if it does not exceed the margin. If it moves a fraction of a pixel the output would blur again. I think a user drag is always a whole pixel, but a programmatic change or change of map size could do it, as can be seen with ImageCanvas where bright red and green pixels are blurred into dull yellow https://codesandbox.io/s/simple-forked-0g8ckv?file=/main.js |
Effectively, but I don't think that we want to automatically query again the layer in this case... |
Describe the bug
If the ratio is not a round int, or map width or map height is not even, the image is blurry...
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The map is pixel perfect
The text was updated successfully, but these errors were encountered: