After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 365257 - Open and save dialog report files with wrong layer counts and color depth
Open and save dialog report files with wrong layer counts and color depth
Status: RESOLVED DUPLICATE of bug 25272
Product: GIMP
Classification: Other
Component: User Interface
2.2.x
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-10-26 12:42 UTC by Nick Smith
Modified: 2008-01-15 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nick Smith 2006-10-26 12:42:48 UTC
Please describe the problem:
When a multilayered file (like an XCF) is saved as TGA, BMP, PNG, or any other format that doesn't support layers, and you select the file in the open or save dialog, the number of layers the image has is incorrectly reported.  The same also occurs with the color depth.  An image with alpha channel saved as BMP has the BMP file telling that it has an alpha channel when BMP doesn't support it.

Steps to reproduce:
1.  Open any XCF image with at least 2 layers.
2.  Save the XCF file into some nonlayered format like BMP, TGA, or PNG.
3.  Close the image window and go to file > open.
4.  Select the file you just saved (but don't open it) and note the number of layers and color format type.
5.  Open the file and it shows as having one layer in the expected format.
6.  (optional).  Save the file you just opened with one layer under the same type and repeat steps 3 and 4 - it now shows up as having one layer and without alpha channel.

Actual results:
If the XCF original had 7 layers, the TGA file I save is shown in the open/save dialog as having 7 layers when the actual file only has one layer.  I save the same XCF file as BMP and I still see it as having 7 layers.  The XCF file had alpha channel used, but the BMP doesn't have alpha channel used and shows up in the open/save dialog as having an alpha channel - it's as if the details are copied over from the original.

Expected results:
It should report the actual number of layers as 1 and the color depth setting as whatever the actual image rather than the format from the saved file.  A nonindexed BMP should report 1 layer in RGB format.  A PNG file should report 1 layer in whatever the format really is for that file rather than what the previous file had.

Does this happen every time?
Yes.

Other information:
I've noticed this odd behavior for a while and I just now found out how to reproduce it.
Comment 1 Sven Neumann 2006-10-26 15:06:07 UTC
Hmm, the thumbnail has information about the original file, not the result of the export. Yet another point showing how conceptually broken the current Export mechanism is but actually nothing but a duplicate of bug #25272.
Comment 2 Sven Neumann 2006-10-26 15:22:57 UTC
We can't fix this easily because the core doesn't know anything about the Export. It calls a plug-in to save the image and this plug-in then decides that it needs to change the image before saving it (for example merging layers). If we decide that integrity of the thumbnails is important, then we need to disable automatic creation of the thumbnails at save time. The thumbnails would then only be created  by loading the saved image and would be correct. This has already been suggested in http://bugzilla.gnome.org/show_bug.cgi?id=25272#c14.

Let's consider to do such a change for 2.4.
Comment 3 Sven Neumann 2006-11-04 09:11:44 UTC
Closing as duplicate of bug #25272. Setting milestone 2.4 on bug #25272.

*** This bug has been marked as a duplicate of 25272 ***