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 132322 - gimp-levels does not work on grayscale images
gimp-levels does not work on grayscale images
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
1.x
Other All
: Normal normal
: 2.0
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-01-23 18:33 UTC by John Hall
Modified: 2004-01-24 18:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description John Hall 2004-01-23 18:33:56 UTC
The gimp-levels function does not appear to work on grayscale images.  In
particular, the following Script-Fu code does not give the expected results:

(set! image 1)  ; for example
(set! drawable (car (gimp-image-get-active-layer image)))
(gimp-image-convert-grayscale image)
(gimp-levels drawable 0 150 200 1.00 0 255)

The gimp-levels function has no effect on the grayscale image.  However,
the Image:Layer/Colors/Levels... tool works fine on the grayscale image
using the same values.

I am using The GIMP 2.0pre2 from here:
http://www2.arnes.si/~sopjsimo/gimp/unstable.html
Comment 1 Pedro Gimeno 2004-01-24 10:28:17 UTC
I can confirm this with current CVS on Linux. The problem was probably
introduced by the fix to bug #109078. Note that it works properly when
you add alpha to the grayscale image.
Comment 2 Michael Natterer 2004-01-24 18:28:31 UTC
Indeed, my fix was not quite correct, will fix this today.
Comment 3 Michael Natterer 2004-01-24 18:35:58 UTC
Fixed in CVS:

2004-01-24  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/color.pdb (levels, curves): fiddle with the
	passed channel index only for GRAYA drawables, not for all GRAY
	drawables. Fixes bug #132322.

	* tools/pdbgen/pdb/color.pdb: regenerated.

	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimplevelstool.[ch]: fixed the same bug here. It never
	occured because the "channel" field was accidentially initialized
	with the correct value and never changed after.