类别图片透明度问题

I can’t understand it, I’m creating icon in Gimp. Adds transparency.

Windows and other programs have a good interpretation, but on the forum a white background is added to the image.

6 hours I get tired of it. What am I doing wrong ?..

Do you know if the image is a PNG or a JPG file after it has been uploaded? My guess is that it’s being converted to a JPG which will remove the transparency. If that’s the case, here’s what you can try:

You can also read more about the conversion behavior here: Very small PNGs are inappropriately converted to JPGs - #23 by sam

Okay, I’ll check it out, but tell me why it’s happening. What is the intention of such conversion?

btw
I tried with many pictures, even loaded very large ones on the whole screen and the problem still existed.

The idea is to cut down the file size whenever possible to reduce the impact on any storage limits.

Have you tried uploading an image with transparency after changing the setting I mentioned? If you are using the same image, it’s possible you may need to alter a pixel so the system does not see it as a duplicate and keep the converted version in favor of the PNG version (this was mentioned in the link I shared)

你好,我已将 PNG 转 JPG 的设置调整为 100,并编辑了新版本,但图片仍被转换为 JPG。有什么建议吗?

我不太确定,我记得 @jamie.wilson 最近处理过这个?设置应该可以控制转换。

根据我使用 GIMP 的经验,您需要按如下方式设置导出选项:

  • 禁用“保存背景色”
  • 启用“保存伽马值”

是的,上传 PNG 时透明度是完好的。问题在于文件仍被转换成了 JPG,而 JPG 不支持透明度。

是的,在其他程序中也是如此。但如果文件具有背景属性,它将被转换为 JPG 格式。如果禁用背景,则不会。这只是我的经验。

编辑:实际上不是。我之前遇到过透明度的问题,但现在无法复现了。总是能正常工作 :man_shrugging:

我发现了这样一个问题:即使将 png_to_jpg_quality 设置为 100,PNG 图片仍会被转换为 JPEG。我刚刚合并了修复该问题的代码。希望这能解决您遇到的问题。

能否更新您的 Discourse 实例,并告知我们问题是否已解决?

是的,现在运行得非常棒!抱歉回复晚了。

谢谢 :laughing: