I mostly do batch scaling using lanczos, but it fails with any filter anyway.
It used to work as expected during months (years?) but I am now seeing an increasing amount of .PNG files that are converted with the transparency replaced by a white background. I attached sample files that cannot be scaled while preserving transparency.
Hope you can dig something. Thanks!
PNG transparency not preserved after conversion
Moderators: XnTriq, helmut, xnview
PNG transparency not preserved after conversion
- Attachments
-
- 3.png (1.24 KiB) Viewed 4530 times
-
- 1.png (1.24 KiB) Viewed 4530 times
-
- 2.png (1.2 KiB) Viewed 4530 times
Re: PNG transparency not preserved after conversion
Prior to rescaling 8-bit (indexed/paletted) PNGs with alpha-channel transparency (1.png + 3.png), you need to increase the color depth to 32 bits. Grayscale PNGs with alpha-channel transparency (2.png) are currently not supported by XnView.
Re: PNG transparency not preserved after conversion
Thank you for the quick reply, but just to be clear, this cannot be done with XnView right?
because actually adding an action such as "modify color depth" => "32bits" does not change anything. (not talking about the "grayscale" one)
edit: I don't want to be rude or anything, but those links in the forum you refer to through google are pretty outdated (2007, 2009..) and I would have thought that such a widespread file format as .PNG would have had more support in XnView (5 years later). Works in GIMP, but GIMP is a pain.
because actually adding an action such as "modify color depth" => "32bits" does not change anything. (not talking about the "grayscale" one)
edit: I don't want to be rude or anything, but those links in the forum you refer to through google are pretty outdated (2007, 2009..) and I would have thought that such a widespread file format as .PNG would have had more support in XnView (5 years later). Works in GIMP, but GIMP is a pain.
Re: PNG transparency not preserved after conversion
ophi wrote:Thank you for the quick reply, but just to be clear, this cannot be done with XnView right?
because actually adding an action such as "modify color depth" => "32bits" does not change anything. (not talking about the "grayscale" one)
- XnView Classic v2.25
- It turns out that the 32 bits command is available in the Image menu of view mode but not in Tools » Batch Processing... » Transformations » Convert.
- It is possible to convert images to RGBA via Actions » Add Action > » Image » Change color depth » 32 bits, but this seems to be the equivalent of XnView Classic's Add alpha command.
Let me put it like this: You won't find anyone on this forum who would be more pleased about a fix than moi.ophi wrote:I would have thought that such a widespread file format as .PNG would have had more support in XnView (5 years later).
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?t=27522&p=109443#p109443]Editing an images loses its transparency[/url]) wrote:This is a known limitation. It was fixed in XnView v1.97 for 8-bit color PNGs + alpha-channel transparency, but the issue persists with grayscale + alpha channel.Brother Gabriel-Marie wrote:Also, an 8bit image with transparency does not display its transparency in XnView in "View" mode, although it *does* in thumbnail mode.
Re: PNG transparency not preserved after conversion
Ok thanks for the clarification. BTW I apologize for my previous posts where I am talking about XnView when actually I only use XnConvert. I have been a long time lover of XnConvert, so
It's no news that PNG is used everywhere on internet, and with the growing adoption of tools such as tinypng.com and other great compressors, we are facing more and more palette reduced PNG files. Hopefully it's not a limitation forever.
Meanwhile I guess I'll write some program to batch convert my PNG files to 32bits color depth before XnConverting them.
Thanks again.
Add me to the list ^^You won't find anyone on this forum who would be more pleased about a fix than moi.
It's no news that PNG is used everywhere on internet, and with the growing adoption of tools such as tinypng.com and other great compressors, we are facing more and more palette reduced PNG files. Hopefully it's not a limitation forever.
Meanwhile I guess I'll write some program to batch convert my PNG files to 32bits color depth before XnConverting them.
Thanks again.
Re: PNG transparency not preserved after conversion
Topic has been moved from “XnView Classic”/“Bug Reports” to “XnView MP”/”XnConvert”ophi wrote:BTW I apologize for my previous posts where I am talking about XnView when actually I only use XnConvert.
My thoughts exactly.ophi wrote:It's no news that PNG is used everywhere on internet, and with the growing adoption of tools such as tinypng.com and other great compressors, we are facing more and more palette reduced PNG files.
FYI: Color reduction with libimagequant was introduced XnView v1.30 and will also be available in MP v0.75.
As you probably know, XnViewMP and XnConvert are based on the Qt framework. I was hoping that these problematic functions could somehow be delegated to Qt (similar to SVG support).ophi wrote:Hopefully it's not a limitation forever.