GNOME Bugzilla – Bug 538728
PNG files are saved with smaller bitdepth and pixel depth
Last modified: 2008-10-30 20:22:17 UTC
Please describe the problem: I installed (from source) babl-0.0.22, gegl-0.0.18 and gimp-2.5.1. From ufraw I have produced a PNG-file, and this is the info pngtool gives: dsc_0118.png... Image Width: 2014 Image Length: 1712 Bitdepth (Bits/Sample): 16 Channels (Samples/Pixel): 3 Pixel depth (Pixel Depth): 48 Colour Type (Photometric Interpretation): RGB Image filter: Single row per byte filter Interlacing: No interlacing Compression Scheme: Deflate method 8, 32k window Resolution: 0, 0 (unit unknown) FillOrder: msb-to-lsb Byte Order: Network (Big Endian) Number of text strings: 3 of 9 Software (tEXt uncompressed): UFRaw Source (tEXt uncompressed): NIKOND40 Raw profile type exif (tEXt uncompressed): [.. cut ..] I open the file in Gimp, and without doing anything else, I save it with a new filename: gimp.png This is what pngtool states about this new file: gimp.png... Image Width: 2014 Image Length: 1712 Bitdepth (Bits/Sample): 8 Channels (Samples/Pixel): 3 Pixel depth (Pixel Depth): 24 Colour Type (Photometric Interpretation): RGB Image filter: Single row per byte filter Interlacing: No interlacing Compression Scheme: Deflate method 8, 32k window Resolution: 2835, 2835 (pixels per meter) FillOrder: msb-to-lsb Byte Order: Network (Big Endian) Number of text strings: 0 of 0 Offsets: 0, 0 As you see, both bitdepth and pixel depth are reduced. In addition the filesize has been reduced to almost 50%. Does not this mean that data in the image is lost? Steps to reproduce: 1. Open the png-file in GIMP 2. Save the png-file in GIMP 3. Actual results: Both bitdepth and pixel depth are reduced. Expected results: The file should be 100% similar Does this happen every time? Yes Other information: In addtition, the exif-information is lost, even I compiles Gimp with libexif-support. But this is covered in bug #56443
Created attachment 112890 [details] The original, just resized (with Image Magick) This is the image produced by ufraw, just resized with Image Magick: convert -resize 10% dsc_0118.png small.png
Created attachment 112891 [details] The same image, after GIMP has saved it. The same as small.png, but after GIMP has just opended and saved it.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 74224 ***
The actual bug here is that the PNG loader, unlike the TIFF load plug-in, does not inform the user that information is discarded when a 16bit PNG image is opened. If you want us to improve that, feel free to open a bug report for it.