PNG with transparency not showing
Moderators: XnTriq, helmut, xnview
-
- Posts: 2
- Joined: Thu Mar 15, 2007 2:19 pm
PNG with transparency not showing
I just discovered XnView, and I have a problem here with PNG files...
the transparency doesn't work with XnView 1.90.3...
Here is how its supposed to look (in IE it works flawless):
Here is how it looks in XnView:
I don't know if that is a bug or a misconfiguration, since it works on every other program I ever opened that image.
Thanks in advance,
Luiz Borges
the transparency doesn't work with XnView 1.90.3...
Here is how its supposed to look (in IE it works flawless):
Here is how it looks in XnView:
I don't know if that is a bug or a misconfiguration, since it works on every other program I ever opened that image.
Thanks in advance,
Luiz Borges
Re: PNG with transparency not showing
FYI: IrfanView 3.99 and Corel PhotoPaint 11 don't like this image either.luiz_borges wrote:I don't know if that is a bug or a misconfiguration, since it works on every other program I ever opened that image.
Here's what TweakPNG 1.2.2 has to say about it:
Code: Select all
Chunk | Contents
------+--------------------------------------------------------
IHDR | PNG image header: 512x512,
| 8 bits/sample,
| grayscale+alpha,
| interlaced
pHYs | pixel size = 3149x3149 pixels per meter (80.0x80.0 dpi)
iCCP | embedded ICC profile: [Photoshop ICC profile]
gAMA | file gamma = 0.45454
cHRM | chromaticities: WP(0.31269,0.32899),
| R(0.63999,0.33001),
| G(0.30000,0.60000),
| B(0.15000,0.05999)
IDAT | PNG image data
IEND | end-of-image marker
Tweak…
—> luiz_borges
Hello! Welcome aboard !
• I confirm, the display is broken in 1.90.3.
- I could display the image properly in Faststone (I don't like, but I've one for such tests)
and in “Imagine” Total Commander plug-in, but the transparency is replaced with white, that's normal for this soft.
• Like our Librarian said and showed, this image seems a bit tricky and special,
so I guess that Pierre has to tweak somes codes in order to support that…
Kind regards,
Claude
Clo
Hello! Welcome aboard !
• I confirm, the display is broken in 1.90.3.
- I could display the image properly in Faststone (I don't like, but I've one for such tests)
and in “Imagine” Total Commander plug-in, but the transparency is replaced with white, that's normal for this soft.
• Like our Librarian said and showed, this image seems a bit tricky and special,
so I guess that Pierre has to tweak somes codes in order to support that…
Kind regards,
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice •
-
- Posts: 2
- Joined: Thu Mar 15, 2007 2:19 pm
Thanks all for the quick reply, I hope this get fixed soon...
I don't know much about PNG encodings and I didn't know this image was tricky, I got that image in wikicommons if I'm not mistaken...
Anyway I think it's good that such image show up, so the code can get better...
PS: btw, this image works just fine with the Image Viewer of Windows XP...
Keep up with the good work,
Luiz Borges
I don't know much about PNG encodings and I didn't know this image was tricky, I got that image in wikicommons if I'm not mistaken...
Anyway I think it's good that such image show up, so the code can get better...
PS: btw, this image works just fine with the Image Viewer of Windows XP...
Keep up with the good work,
Luiz Borges
- foxyshadis
- Posts: 390
- Joined: Sat Nov 18, 2006 8:57 am
That's what it looks like if you turn off alpha channel processing. (Checked with this.) I guess xnview is getting confused somehow, since it normally reads them fine.
It's funny, xnview shows only the RGB channel, while irfanview shows only the alpha channel. Image analyzer however, splits it into 2 images. I used PSP7 to combine those 2 images into a properly transparent image, then saved it from there.
http://allspark.net/cypherswipe/yang-grey-alpha.png <-greyscale with alpha transparency
http://allspark.net/cypherswipe/yang-full-alpha.png <-truecolor with alpha trans
http://allspark.net/cypherswipe/yang-grey-alpha.png <-greyscale with alpha transparency
http://allspark.net/cypherswipe/yang-full-alpha.png <-truecolor with alpha trans
Re: PNG with transparency not showing
Ok, it's normal. It's a 8bits picture with a list of transparency color index. XnView support only 8bits + 1 transparency color or 32bitsluiz_borges wrote:I just discovered XnView, and I have a problem here with PNG files...
the transparency doesn't work with XnView 1.90.3...
I don't know if that is a bug or a misconfiguration, since it works on every other program I ever opened that image.
Thanks in advance,
Luiz Borges
Pierre.
I've got a similar problem. Xnview seems to be the only app displaying the picture in the wrong way. Firefox for example displays it correctly.
But I wonder how it is possible that Xnview displays image information that really shouldn't be there. I created this picture by making a selection in Photoshop of the original image, copying and pasting it in a new, empty image with transparent background. I saved this as a PNG. Do you know why Photoshop includes this extra information in the image when copying a selection? I always thought it would only copy those pixels within the selection, and nothing outside of that. It's also really ineffective if those extra pixels are saved, making the files unnecessarily large.
http://robotriot.hokuten.net/trash/gestaeng01.png
But I wonder how it is possible that Xnview displays image information that really shouldn't be there. I created this picture by making a selection in Photoshop of the original image, copying and pasting it in a new, empty image with transparent background. I saved this as a PNG. Do you know why Photoshop includes this extra information in the image when copying a selection? I always thought it would only copy those pixels within the selection, and nothing outside of that. It's also really ineffective if those extra pixels are saved, making the files unnecessarily large.
http://robotriot.hokuten.net/trash/gestaeng01.png
No idea why photoshop includes that extra stuff, never use the prog myself. It'd be interesting if you tried repeating the experiment, but saving it as a gif instead of a png. Photoshop has had issues with pngs in the past, it wouldn't surprise me if it's doing it again.
As far as why it displays differently, it has an alpha channel transparency that xnview isn't showing. Image analyzer doesn't compose pngs with alpha channels properly either, but it does show the alpha channel as a seperate image. When I opened your pic in IA, it shows the 24bit image with all the extra data and no transparency, and an 8bit alpha channel transparency mask that (when applied) would make all the extra stuff transparent.
http://allspark.net/cypherswipe/forklift-photo.png
http://allspark.net/cypherswipe/forklift-alphamask.png
If you open the photo in any editor capable of applying masks, and use the second image as the mask, it'll recreate the transparency.
Try saving the image again, but use the "save for web" option.
As far as why it displays differently, it has an alpha channel transparency that xnview isn't showing. Image analyzer doesn't compose pngs with alpha channels properly either, but it does show the alpha channel as a seperate image. When I opened your pic in IA, it shows the 24bit image with all the extra data and no transparency, and an 8bit alpha channel transparency mask that (when applied) would make all the extra stuff transparent.
http://allspark.net/cypherswipe/forklift-photo.png
http://allspark.net/cypherswipe/forklift-alphamask.png
If you open the photo in any editor capable of applying masks, and use the second image as the mask, it'll recreate the transparency.
Try saving the image again, but use the "save for web" option.
If I compose it in paint shop pro, it removes the extra crap. When the image is viewed in a prog that doesn't properly support alpha transparency, the transparent parts of the image are plain black. The filesize is another giveaway. Your photo with transparency is 309k, the photo without the alpha mask is 280k, the alpha transparency created by PSP is only 185k (and if I knock it down to 256 colors /w single color transparency (like a gif), it's only 50k).
http://allspark.net/cypherswipe/forklift-a.png <-alpha trans, courtesy of PSP
http://allspark.net/cypherswipe/forklift-c.png <-256 color
http://allspark.net/cypherswipe/forklift-a.png <-alpha trans, courtesy of PSP
http://allspark.net/cypherswipe/forklift-c.png <-256 color
XnView v1.9X displays the image perfectly correct. Is the Use transparent index (<=8bits) or alpha channel setting (Tools » Options... » View » View) turned off in your installation, robotriot? If so, XnView is actually just revealing the mess that's left behind by Photoshop.
I ran into this problem myself while trying to improve my skills in background masking, and if it hadn't been for XnView, I probably would never have become aware of this “hidden data” flaw.
I doubt the problem is caused by Adobe's PNG file format filter (Png.8bi). Even exporting with SuperPNG (freeware) or the plug-in version of PNGOUT (shareware) doesn't get rid of all excess image information.
In the two combined screenshots below you can see how Corel PHOTO-PAINT v11 displays the file:
I ran into this problem myself while trying to improve my skills in background masking, and if it hadn't been for XnView, I probably would never have become aware of this “hidden data” flaw.
I doubt the problem is caused by Adobe's PNG file format filter (Png.8bi). Even exporting with SuperPNG (freeware) or the plug-in version of PNGOUT (shareware) doesn't get rid of all excess image information.
In the two combined screenshots below you can see how Corel PHOTO-PAINT v11 displays the file:
- [ Zoom ]
Top: Marquee Visible
Bottom: Mask Overlay
- Flickr » factoryjoe's photos: Flock Icon Huge
- PhotoshopStar » Tutorials: Industrial Gaming Header
- Albino Blacksheep » Tutorials: Picture Cutout in Photoshop
- Mortal Kombat Warehouse » Sareena: Cut Out Pictures
- Trucos para Windows » Foros: Recortar y pasar de "png" a "jpeg", Urgente!!!! PhotoShop (ES»EN)
Code: Select all
Chunk | Contents
------+------------------------------------------
IHDR | PNG image header: 687x486,
| 8 bits/sample,
| truecolor+alpha,
| noninterlaced
pHYs | pixel size = 2835x2835 pixels per meter (72.0x72.0 dpi)
iCCP | embedded ICC profile: [Photoshop ICC profile]
gAMA | file gamma = 0.45454
cHRM | chromaticities: WP(0.31269,0.32899),
| R(0.63999,0.33001),
| G(0.30000,0.60000),
| B(0.15000,0.05999)
IDAT | PNG image data
IEND | end-of-image marker
-
- Posts: 23
- Joined: Sun Jun 10, 2007 12:48 pm
- Location: Munich
- Contact:
Hi, XnTriq,
I just had the same problem with a 32 bit PNG, and I solved it by turning this option on. So I like to ask: Is there any reason to turn off this option? Wouldn't it be better to have off as default setting?XnTriq wrote:XnView v1.9X displays the image perfectly correct. Is the Use transparent index (<=8bits) or alpha channel setting (Tools » Options... » View » View) turned off in your installation, robotriot?
Wolfgang Beyer
www.wolfgangbeyer.de
www.wolfgangbeyer.de
Hello wolfgangbeyer
Well, currently Pierre is thinking about moving this very option to the menu (see topic “Transparency & alpha”).
But there are quite a few other settings that have direct or indirect influence on how transparency (especially in PNGs) is displayed:
Well, currently Pierre is thinking about moving this very option to the menu (see topic “Transparency & alpha”).
But there are quite a few other settings that have direct or indirect influence on how transparency (especially in PNGs) is displayed:
- View
- Show Mask
- Tools » Options...
- General » Read/Write » Read » PNG
- Parameters
Compose image with transparency
Compose image with alpha (32bits)
- Parameters
- View » View
- Auto Image Size
- Background Colour
- Use transparent index (<=8bits) or alpha channel
Xyzzy (Options' descriptions for 1.82) wrote: “For files with depth <= 8bits per pixel (fe. GIF), show transparent/alpha masked ??? areas in background color. Note: Thumbnails in Browser always show transparency, also for files with depth greater than 8 bit.”
- General » Read/Write » Read » PNG
- 32-bit BMPs
- Windows Cursors (.CUR) & Animated Cursors (.ANI)
- 8-bit Windows Icons (.ICO)
- 32-bit Windows Icons (.ICO)
- GIFs & Animated GIFs
- 8-bit (palette-based) PNGs with binary transparency
- 8-bit RGB-A PNGs (alpha-channel)
- 24-bit PNGs with binary transparency
- 32-bit RGB-A PNGs (including those with “multi-level transparency”)
- Photoshop (.PSD)
- TARGA (.TGA)
- TIFF
-
- Posts: 23
- Joined: Sun Jun 10, 2007 12:48 pm
- Location: Munich
- Contact:
I made a typing error. I would like to ask: Wouldn't it be better to have on as default setting?
Hi, XnTriq, thank you for your detailed answer, but I understand only very few. In XnView transparency is not edited but only displayed, so far I understand. So I don’t understand the option Tools » Options » General » Read/Write » Read » PNG » Parameters » Compose ...
And what is displayed if "For files with depth <= 8bits per pixel (fe. GIF), show transparent/alpha masked ??? areas in background color" is turned off? I have difficulties to understand, how this can be a description of an option called "Use transparent index (<=8bits) or alpha channel" at all. What are the disadvantages or the advantages to turn this option off? I my case off seems to display nonsense.
Or does off means to ignore the transparent/alpha maske and display the hidden colors in the RGB channels, which are actually intended not to be visible due to the transparency? Than off as default seems nonsense for me.
Hi, XnTriq, thank you for your detailed answer, but I understand only very few. In XnView transparency is not edited but only displayed, so far I understand. So I don’t understand the option Tools » Options » General » Read/Write » Read » PNG » Parameters » Compose ...
And what is displayed if "For files with depth <= 8bits per pixel (fe. GIF), show transparent/alpha masked ??? areas in background color" is turned off? I have difficulties to understand, how this can be a description of an option called "Use transparent index (<=8bits) or alpha channel" at all. What are the disadvantages or the advantages to turn this option off? I my case off seems to display nonsense.
Or does off means to ignore the transparent/alpha maske and display the hidden colors in the RGB channels, which are actually intended not to be visible due to the transparency? Than off as default seems nonsense for me.
Wolfgang Beyer
www.wolfgangbeyer.de
www.wolfgangbeyer.de