mirror of
https://github.com/plankanban/planka.git
synced 2026-02-25 03:14:50 +03:00
Preview blurry #257
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dev0Louis on GitHub (Dec 3, 2022).
When you upload pixel art.
The preview gets very blurred.
How it should look:

How it looks:

Why does it blur so much?
And is there a Way to change it to display it without blur?
@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.
@Dev0Louis commented on GitHub (Dec 15, 2022):
The Original images are .png and 16x16 pixel.
So could it be something with the upscaling?
@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.
@Dev0Louis commented on GitHub (Dec 20, 2022):
If I download the image it is fine.

The Preview looks like this:
And if you click on it, it is shown "right" just very small:

And here is the example picture:
https://user-images.githubusercontent.com/82884007/208661029-b6276966-695a-4384-ae94-492e416a06a1.png
@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?
@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)
Would this result in Image just beeing upscaled and than displayed, yes.
If just seeing it would be a challange, no.
@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 🤔