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 795791 - In Indexed-Color Mode, pixels can suddenly change opacity across versions
In Indexed-Color Mode, pixels can suddenly change opacity across versions
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: libgimp
unspecified
Other All
: Normal minor
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2018-05-04 03:21 UTC by James Koppel
Modified: 2018-05-24 19:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Exhibits bug in backwards direction (37.00 KB, image/x-xcf)
2018-05-04 03:21 UTC, James Koppel
Details

Description James Koppel 2018-05-04 03:21:10 UTC
Created attachment 371654 [details]
Exhibits bug in backwards direction

Prior to 2014, pixels in indexed color mode could not be semitransparent, but they could still be serialized in XCF files with an opacity 

Bug, forward direction:
* In GIMP 2.8.22 or previous, create an image in indexed color mode. Set opacity to 0.6, and draw. It will appear completely opaque.
* Open file in GIMP 2.10 or other modern version. 
---- Expected behavior: Image will appear the same as in GIMP 2.8.22
---- Actual behavior: Drawn pixels will now be semitransparent

Bug, backwards direction:
* In GIMP 2.10 or other post-2014 version, create an image in indexed color mode. Set the mode of every layer to "Dissolve." Set opacity to 0.6 and draw. It will appear semitransparent.
* Open file in GIMP 2.8.22 or previous
---- Expected result: Either it will display the same as drawn, or GIMP 2.8.22 will give an error that it can't open the file
---- Actual result: GIMP 2.8.22 opens the file, but displays all pixels as completely opaque.

Note: Setting the layer's mode to DISSOLVE is necessary so that GIMP will save the XCF as version 0. Anything else will cause it to save as version 9 or newer, hiding the bug. See the gimp_image_get_xcf_version function for explanation.

I've attached a file displaying this bug in the backwards direction. I tested between GIMP 2.8.22 on Mac (the newest available for Mac, AFAICT), and GIMP 2.10.0 on a Windows VM.

--------------------

I found this bug while writing a case study about the GIMP codebase for a software design course. I suspected this bug might happen after reading the below comment from xcf.txt. It did indeed happen.

"In images that use the indexed color model, GIMP does not support
partial transparency and interprets alpha values from 0 to 127 as
fully transparent and values from 128 to 255 as fully opaque. This
behavior _may_ change in future versions of GIMP.
TODO: has already changed?"
Comment 1 GNOME Infrastructure Team 2018-05-24 19:44:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1403.