Page 1 of 1
PNG and saving transpareny
Posted: Sun Jan 08, 2006 11:02 am
by klumy
hello,
in IrfanView it is possible to set which colour should be transpareny if you save a PNG image, by clicking on the colour of the image.
Such a feature would be really useful for XNView.
I often use this feature because I use the image for Powerpoint. So the unuseful background of the image is transparent and can easily be integrated into powerpoint
Re: PNG and saving transpareny
Posted: Sun Jan 08, 2006 12:18 pm
by xnview
klumy wrote:in IrfanView it is possible to set which colour should be transpareny if you save a PNG image, by clicking on the colour of the image.
Such a feature would be really useful for XNView.
I often use this feature because I use the image for Powerpoint. So the unuseful background of the image is transparent and can easily be integrated into powerpoint
You can do that by editing colormap ("Image > Edit color map").
Posted: Sun Jan 08, 2006 2:37 pm
by klumy
this feature is invisible here
Posted: Sun Jan 08, 2006 4:40 pm
by helmut
klumy wrote:this feature is invisible here
If your image is not a palette image (<=256 colours), you won't be able to edit the colour palette and set transparency in XnView.
I even think that it's not possible at all to set transparency for PNGs with more than 256 colours.
Posted: Sun Jan 08, 2006 5:28 pm
by klumy
I don't think its dependable from the number of colours
I have some PNG with more than 256 colors created with IRfanView and they also support transparency
Posted: Mon Jan 09, 2006 7:45 am
by xnview
klumy wrote:I don't think its dependable from the number of colours
I have some PNG with more than 256 colors created with IRfanView and they also support transparency
So you want to set the transparency for one color, and for a picture more than 256 colors?
Posted: Mon Jan 09, 2006 1:22 pm
by Drahken
That is an official feature of PNGs. You can use alpha transparency on either a 256, a greyscale, or a truecolor PNG (although most progs only allow creating truecolor and greyscale PNGs with alpha transparency), and you can use single color transparency on a 256 color, a greyscale, or a truecolor PNG. In fact, one workaround for M$IE's crappy PNG support is to set a transparent color in the image AND set an alpha transparency. Decent browsers will show the image with the alpha transparency, and M$IE will fallback to single color transparency.
The problem is, I don't know how xnview would allow you to choose a single transparent color for PNGs with >256 colors, since such images don't have a "palette" (as such, all images have a palette).
As far as choosing the transparent color for 256 or less images, it works fine for me, I've used it several times.
Posted: Mon Jan 09, 2006 3:17 pm
by xnview
Drahken wrote:That is an official feature of PNGs. You can use alpha transparency on either a 256, a greyscale, or a truecolor PNG (although most progs only allow creating truecolor and greyscale PNGs with alpha transparency), and you can use single color transparency on a 256 color, a greyscale, or a truecolor PNG. In fact, one workaround for M$IE's crappy PNG support is to set a transparent color in the image AND set an alpha transparency. Decent browsers will show the image with the alpha transparency, and M$IE will fallback to single color transparency.
The problem is, I don't know how xnview would allow you to choose a single transparent color for PNGs with >256 colors, since such images don't have a "palette" (as such, all images have a palette).
As far as choosing the transparent color for 256 or less images, it works fine for me, I've used it several times.
Currently single color for transparency on a 24bits picture is not possible
Posted: Mon Jan 09, 2006 5:21 pm
by Drahken
Here's a quick demo I made if anyone wants to play around with it:
http://allspark.net/cypherswipe/trans-truecolor-png.png
Note: Not all browsers or viewers can handle this kind of transparency. Gecko based browsers such as netscape and firefox handle it fine, I'm pretty sure opera does too. FYI the big area in the middle is the transparent part.
Posted: Sun Dec 03, 2006 12:23 am
by GeorgD
xnview wrote:Currently single color for transparency on a 24bits picture is not possible
Is this still (1.90beta2) the current state? I understood your post (Fri Oct 29, 2004 in
http://newsgroup.xnview.com/viewtopic.php?t=561) differently *confused*
/Georg
Re: PNG and saving transpareny
Posted: Tue Sep 14, 2010 11:04 am
by dma_k
xnview wrote:You can do that by editing colormap ("Image > Edit color map").
Thanks for the hint. First I wrongly tried to play with
Options > Genral Write > PNG > Set the transparency value, then I learned how to use a
Image > Edit color map, I finally understood that I need to use not more than 265 colors in order
File > Export > PNG > Set transparency color button to get enabled

Posted: Wed Oct 27, 2010 11:24 pm
by Jaff
xnview wrote:Currently single color for transparency on a 24bits picture is not possible
That's not a problem. XN can generate a warning window to increase number of colors to RGBA (32bit) and continue to generate mask from the chosen color.
Re:
Posted: Thu Oct 28, 2010 3:12 pm
by MaxSt
Jaff wrote:That's not a problem.
Incomplete support for PNG format *is* a problem for XnView.