PNG and saving transpareny
Moderators: XnTriq, helmut, xnview
-
- Posts: 229
- Joined: Sat Jun 18, 2005 9:33 am
PNG and saving transpareny
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
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
XNView 1.91.5
Windows XP SP3
Windows XP SP3
-
- Author of XnView
- Posts: 40584
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: PNG and saving transpareny
You can do that by editing colormap ("Image > Edit color map").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
Pierre.
-
- Posts: 229
- Joined: Sat Jun 18, 2005 9:33 am
-
- Moderator
- Posts: 8697
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
-
- Posts: 229
- Joined: Sat Jun 18, 2005 9:33 am
-
- Author of XnView
- Posts: 40584
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 884
- Joined: Sun Apr 10, 2005 4:29 pm
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.
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.
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!
-
- Author of XnView
- Posts: 40584
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Currently single color for transparency on a 24bits picture is not possibleDrahken 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.
Pierre.
-
- Posts: 884
- Joined: Sun Apr 10, 2005 4:29 pm
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.
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.
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!
-
- Posts: 284
- Joined: Thu Oct 12, 2006 2:45 pm
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*xnview wrote:Currently single color for transparency on a 24bits picture is not possible
/Georg
-
- Posts: 93
- Joined: Tue Apr 14, 2009 8:50 am
Re: PNG and saving transpareny
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 enabledxnview wrote:You can do that by editing colormap ("Image > Edit color map").

-
- Posts: 67
- Joined: Fri Dec 07, 2007 8:55 am
- Location: Romania
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.xnview wrote:Currently single color for transparency on a 24bits picture is not possible
Imi este indiferent ce cred ceilalti despre mine, caci oricum fiecare crede ce-i convine lui si nu ceea ce e real, doar ca mi-ar fi placut sa ma vada asa cum sint de fapt, nu asa cum poate le-ar placea lor sa creada. Ei au ales deja...
-
- Posts: 133
- Joined: Fri Apr 10, 2009 9:55 pm
Re:
Incomplete support for PNG format *is* a problem for XnView.Jaff wrote:That's not a problem.