LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.25k stars 880 forks source link

Regression in transparent .png rendering? #1305

Closed poVoq closed 3 years ago

poVoq commented 3 years ago

See top icon here: https://lemmy.ml/c/opensourcegames

I think the transparency was working until very recently, and it works in other places on Lemmy with the same .png file.

dessalines commented 3 years ago

This has to do with pict-rs, when doing a picture conversion to webp for the thumbnails, it seems to mess up transparency. Transparents are not supported for now, I'd just edit your image.

You could also try to open up an issue on pict-rs, but its just using an image conversion library, and most are probably going to have that problem.

poVoq commented 3 years ago

How come the transparency is working for the smaller icons then?

dessalines commented 3 years ago

Seems to be for specific thumbnail sizes, again, not inside lemmy. Open up an issue on pictrs.

Compare

poVoq commented 3 years ago

Cutting off a few pixels and reexporting the png from GIMP suddenly made it work.

On the other hand .gif files show an error in Lemmy when I try to upload them. Something about failing to validate, but the popup is gone too quickly.

poVoq commented 3 years ago

Also, if uploading a banner, would it be possible to not render the icon on the community page then? It looks really strange when both is enabled.

dessalines commented 3 years ago

Also, if uploading a banner, would it be possible to not render the icon on the community page then? It looks really strange when both is enabled.

Both are optional, but you can't choose to not render one if the other exists.

I haven't messed with gif / mp4 support with pict-rs yet, especially since loading them by default would be a lot to download.

poVoq commented 3 years ago

This is rather confusing, did all the pictures got re-rendered on the upgrade to 0.8.10? Because again pictures that worked perfectly fine in 0.8.9, suddenly broke in regards to transparency.

Honestly, if this is really an upstream issue, than that library seems super flaky and it might be better to replace it with something working better.