[solved] Cropping 32-bit PNG image results in a 24-bit image
Moderators: helmut, XnTriq, xnview
[solved] Cropping 32-bit PNG image results in a 24-bit image
When cropping a 32-bit PNG image, the result is a 24-bit image with the transparency data merged.
Last edited by SharkD on Fri Mar 02, 2007 10:34 pm, edited 1 time in total.
Re: Cropping 32-bit PNG image results in a 24-bit image
Are you sure that you have loaded the 32bits PNG as 32bits??? And not in 24bits? You use crop in view mode?SharkD wrote:When cropping a 32-bit PNG image, the result is a 24-bit image with the transparency data merged.
Pierre.
32 BPP still here
—> SharkD
Hello !
• I tested with your image, and I cannot confirm.
• The cropped image is saved as 32 BPP, and it's announced as is, as well in XnView as in all other softs I tried for checking…
- The Alpha channel is saved too, the transparency is kept alright !
- A copy of the cropped image changed as 24 BPP turns to black BG, and its size is reduced by ~40% !
KR
Claude
Clo

• I tested with your image, and I cannot confirm.
• The cropped image is saved as 32 BPP, and it's announced as is, as well in XnView as in all other softs I tried for checking…
- The Alpha channel is saved too, the transparency is kept alright !
- A copy of the cropped image changed as 24 BPP turns to black BG, and its size is reduced by ~40% !

Claude
Clo
Old user ON SELECTIVE STRIKE till further notice •
I can't get the test image to display properly in xnview. If I have tools->options->read/write->png->compose with alpha checked, I get a white background. If it's unchecked, I get a black one. My application background is grey, and therefore the transparent parts of the image should also be grey. Checking/unchecking the compose with transparency option has no effect (regardless whether or not the alpha option is also checked).
"Compose with transparency" is for 8-bit images, so it should rightly not have any effect upon a 32-bit image.
Try disabling both those options and enabling the "Use transparent index (<= 8bits) or alpha channel" option, instead. The image should then render smoothly on top of your application background.
Personally I think both the PNG-specific options should be deprecated.
Try disabling both those options and enabling the "Use transparent index (<= 8bits) or alpha channel" option, instead. The image should then render smoothly on top of your application background.
Personally I think both the PNG-specific options should be deprecated.
The "Use transparent index (<= 8bits) or alpha channel" option was already checked, and toggling it on or off has no effect. I have tried all combinations of having those 3 options toggled on/off, and always gt either the black or white backgrounds. The image displays proper transparency when viewed in other programs, so I'm certain it's not a problem with the image itself.
I had the same problem. Reinstalling the program to a fresh directory solved it for me.
Note that simply toggling the options on/off will not always update the image right away. Sometimes you have to switch to another image and then switch back before the changes take affect.
Do you have the "Auto image size" option set to "no fit"? This has caused problems for me.
What does the image look like in the Preview tab of the file browser?
Note that simply toggling the options on/off will not always update the image right away. Sometimes you have to switch to another image and then switch back before the changes take affect.
Do you have the "Auto image size" option set to "no fit"? This has caused problems for me.
What does the image look like in the Preview tab of the file browser?
1) The image never updates simply because you change an option. After changing an option, I open the image again in a new tab.
2) I almost never have imaging progs set to fit anything, scrolling an image is less annoying than always having to zoom out.
3) I never use browser mode.
I remember discussing this issue here with some other image/s before, I don't think anything ever became of it. It's not a big deal anyway, since I almost never deal with alpha trans PNGs. They're a great concept, but the filesizes are insane. It's really be good if the JNG format would catch on so that we could have alpha trans with a more reasonable filesize, but until then.....
2) I almost never have imaging progs set to fit anything, scrolling an image is less annoying than always having to zoom out.
3) I never use browser mode.
I remember discussing this issue here with some other image/s before, I don't think anything ever became of it. It's not a big deal anyway, since I almost never deal with alpha trans PNGs. They're a great concept, but the filesizes are insane. It's really be good if the JNG format would catch on so that we could have alpha trans with a more reasonable filesize, but until then.....
Pngcrush and similar programs can greatly reduce the size of a PNG image, but 32bit PNGs are still unreasonably large, there is simply no way around this as long as PNGs are lossless (the JNG format allows lossy compression). Take a truecolor PNG and compare it to either an 8bit PNG or a JPG (depending on the content of the image), and you'll find that the JPG/8bit PNG is extremely smaller than even pngcrush can make the truecolor PNG, even though the visual quality remains very similar.