Return to Level1Techs.com

Pngs saved as jpeg when posted on forum breaking transparency

link saved as png has transparency and alpha working properly



when uploaded on forums you just have white where transparency layer should be. matters to me since avatars dont work right and the jpeg work around to get transparency working seems like a lot of work. any way we could upload pngs and have them stay pngs?

also apparently after a short while the forums stops showing the embedded link and instead uploads and host a copy as a jpg which breaks transparency and maybe could be a copywrite issue? idk not a lawyer

2 Likes

AFAIK the JPEG standard does not contain a transparency specification so it cannot contain said data.

Transparency works in a way that a specific color is chosen in the hex format:
000000 (black)
FFFFFF (white)
00FF00 (green - usually picked, sometimes pink)

and all pixels with that specific color is tagged for transparency. PNG has this information and can display it correctly but the JPEG format does not support it and just shows the transparency color instead.

1 Like

PNG:
Uploaded to forum:
test_img_1

Embedded:

1 Like
Testing a couple...

grunt.PNG

Shikinami-cheer-emoticon

Seems inconsistent. First image is PNG and the forum kept it as PNG. Second image is PNG and the forum converted it to JPEG. Third is just a GIF with transparency and transparency stayed.

EDIT: Another PNG that stayed PNG and one that didn't.

DJobto8XUAAfDvE

3 Likes