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

Bad image quality of maps after zooming in #275

Open
nick-traeger opened this issue Dec 2, 2022 · 9 comments
Open

Bad image quality of maps after zooming in #275

nick-traeger opened this issue Dec 2, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@nick-traeger
Copy link

Describe the Issue

Hello,
unfortunately, the images of maps are displayed by the browser (tested in Chrome on PC and on Safari on iPad) much worse than the original would allow. You can see this very well when you scroll into the images.

tarkov-map-comparsion

Expected Behavior

Image quality should be the same as the original.

To Reproduce

Open any map and zoom in. Compare this to the original image.

Client

Desktop

Browser

Chrome

Relevant Console Log Output

No response

Extra Information

If you apply image-rendering: pixelated; to the img tag of the map it is a bit better.

@nick-traeger nick-traeger added the bug Something isn't working label Dec 2, 2022
@Shebuka
Copy link
Contributor

Shebuka commented Dec 2, 2022

Is this happening only on iPad? I've just tried it on my Mac in Chrome and the image loads correctly at full resolution.

@nick-traeger
Copy link
Author

No, on my computer (windows and linux) too. It loads the right image but it renders with bad quality.

@Shebuka
Copy link
Contributor

Shebuka commented Dec 2, 2022

Very strange... We are doing a transform of the image to make it freely zoomable and there is an issue that you can't have a 100% zoom 1:1 pixel with the original (cause it's calculated as starting point at 1x relative to the available screen size).

This is what I see right now:
Screenshot 2022-12-02 at 11 00 49

Can you see if there are any error in script loading in the console of the developer tools?

p.s. link to the page for ease of access: https://tarkov.dev/map/woods-3d

@nick-traeger
Copy link
Author

No errors in the console.

The left side of your image is more blurry than the right side.
image

Again, a screenshot from a friend's Mac:
tarkov-map-mac

@Shebuka
Copy link
Contributor

Shebuka commented Dec 2, 2022

The left side of your image is more blurry than the right side.

Yes, that's the issue I was referring to as not 100% zoom. You can see that both images are aligned to the bottom but that the labels' area ends slightly lower on the left side, that's because it shows the image at like 98% zoom.

@GrantBirki can you look into this?

@GrantBirki
Copy link
Member

I'm on Linux (Ubuntu) and just tested between the source image and the zoomable web image. I could not see any difference as far as my eyes go 👀

image

Left is web (zoomable) - Right is source image


I went ahead and purged our entire Cloudflare CDN in the off chance that something is up with caching.

@GrantBirki
Copy link
Member

That blurriness in the screenshots above is super weird honestly. I have not seen something like that before except in photo editing software when someone applies a blur filter to an image

@nick-traeger
Copy link
Author

I think this is the problem:
BetterTyped/react-zoom-pan-pinch#248

@GrantBirki
Copy link
Member

@nick-traeger That looks like it is indeed the issue. I wonder if there is an alternate npm package we can use instead? Seeing as that bug has been open for a while without any traction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants