Preview blurry #257

Closed
opened 2026-02-04 18:08:10 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @Dev0Louis on GitHub (Dec 3, 2022).

When you upload pixel art.
The preview gets very blurred.

How it should look:
image

How it looks:
image

Why does it blur so much?
And is there a Way to change it to display it without blur?

Originally created by @Dev0Louis on GitHub (Dec 3, 2022). When you upload pixel art. The preview gets very blurred. How it should look: ![image](https://user-images.githubusercontent.com/82884007/205449298-ffa1cf21-3db7-47cc-9295-f52b89d6e2aa.png) How it looks: ![image](https://user-images.githubusercontent.com/82884007/205449315-403cc331-6ae2-43bd-92f0-18038d5cff84.png) Why does it blur so much? And is there a Way to change it to display it without blur?
Author
Owner

@meltyshev commented on GitHub (Dec 14, 2022):

Hmm, maybe I made the wrong settings when converting the image... Probably the original image should not be converted to jpg, but use the original extension. I'll try to change that.

@meltyshev commented on GitHub (Dec 14, 2022): Hmm, maybe I made the wrong settings when converting the image... Probably the original image should not be converted to jpg, but use the original extension. I'll try to change that.
Author
Owner

@Dev0Louis commented on GitHub (Dec 15, 2022):

The Original images are .png and 16x16 pixel.
So could it be something with the upscaling?

@Dev0Louis commented on GitHub (Dec 15, 2022): The Original images are .png and 16x16 pixel. So could it be something with the upscaling?
Author
Owner

@meltyshev commented on GitHub (Dec 19, 2022):

The original picture is not converted when uploading attachments, so there shouldn't be a problem with previews 🤔
Or did you mean it gets blurred when displayed on the card itself? Can I ask you to send me an example image so I can try it.

@meltyshev commented on GitHub (Dec 19, 2022): The original picture is not converted when uploading attachments, so there shouldn't be a problem with previews 🤔 Or did you mean it gets blurred when displayed on the card itself? Can I ask you to send me an example image so I can try it.
Author
Owner

@Dev0Louis commented on GitHub (Dec 20, 2022):

The original picture is not converted when uploading attachments, so there shouldn't be a problem with previews thinking Or did you mean it gets blurred when displayed on the card itself? Can I ask you to send me an example image so I can try it.

If I download the image it is fine.
The Preview looks like this:
image

And if you click on it, it is shown "right" just very small:
image

And here is the example picture:
https://user-images.githubusercontent.com/82884007/208661029-b6276966-695a-4384-ae94-492e416a06a1.png

@Dev0Louis commented on GitHub (Dec 20, 2022): > The original picture is not converted when uploading attachments, so there shouldn't be a problem with previews thinking Or did you mean it gets blurred when displayed on the card itself? Can I ask you to send me an example image so I can try it. If I download the image it is fine. The Preview looks like this: ![image](https://user-images.githubusercontent.com/82884007/208659916-c153fe2a-f66e-4e8c-93fa-550008f72b0c.png) And if you click on it, it is shown "right" just very small: ![image](https://user-images.githubusercontent.com/82884007/208660647-c8f7f1aa-d27e-4f0b-b61e-8042258af4ab.png) And here is the example picture: https://user-images.githubusercontent.com/82884007/208661029-b6276966-695a-4384-ae94-492e416a06a1.png
Author
Owner

@meltyshev commented on GitHub (Dec 20, 2022):

Ah, now I get it. This is because the image is resized to 256 in width, and if the image is less than 256, it will be stretched.
I think we should add a check that if the image is already small, it doesn't need to be resized. Should we allow such small images as a cover?

@meltyshev commented on GitHub (Dec 20, 2022): Ah, now I get it. This is because the image is resized to 256 in width, and if the image is less than 256, it will be stretched. I think we should add a check that if the image is already small, it doesn't need to be resized. Should we allow such small images as a cover?
Author
Owner

@Dev0Louis commented on GitHub (Dec 21, 2022):

Hm upscaling with nearest neighbor would make it work, I think.
(That is what I did for the Screenshot)

Should we allow such small images as a cover?

Would this result in Image just beeing upscaled and than displayed, yes.
If just seeing it would be a challange, no.

@Dev0Louis commented on GitHub (Dec 21, 2022): Hm upscaling with nearest neighbor would make it work, I think. (That is what I did for the Screenshot) > Should we allow such small images as a cover? Would this result in Image just beeing upscaled and than displayed, yes. If just seeing it would be a challange, no.
Author
Owner

@meltyshev commented on GitHub (Dec 22, 2022):

Cool! It works as in your example with kernel: sharp.kernel.nearest. It remains to decide what to do with the image in the gallery, because it displays the original image 🤔

@meltyshev commented on GitHub (Dec 22, 2022): Cool! It works as in your example with `kernel: sharp.kernel.nearest`. It remains to decide what to do with the image in the gallery, because it displays the original image 🤔
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#257