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 119233 - There is no PDB entry for auto-level, so it can't be used from script-fu.
There is no PDB entry for auto-level, so it can't be used from script-fu.
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: libgimp
unspecified
Other Linux
: Normal enhancement
: 2.0
Assigned To: GIMP Bugs
GIMP Bugs
: 84835 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-08-06 04:26 UTC by Shawn Willden
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to add levels_auto to PDB (3.15 KB, patch)
2003-08-09 06:30 UTC, Shawn Willden
none Details | Review

Description Shawn Willden 2003-08-06 04:26:12 UTC
Description of Problem: 
 
There seems to be no way to perform an auto-level 
(Layer/Colors/Levels/Auto on the 1.3 GUI) from a script.  
Please add a function to the PDB to provide the needed 
interface. 
 
It looks like fixing this is just a matter of adding the code in 
color.pdb to call levels_auto (from app/base/levels.h).  My perl 
is really weak (i.e. nonexistant) or I'd submit a patch.
Comment 1 Nathan Summers 2003-08-06 16:44:11 UTC
Would this really add any features that the Equalize (or Normalize, I
forget, and I don't have gimp with me here at work :( ) plug-in
doesn't already provide?
Comment 2 Shawn Willden 2003-08-07 01:25:55 UTC
That's a good question, Nathan.  I'm not sure exactly what equalize
(it is called equalize, I found it in the PDB) does.  Is it precisely
the same as auto-level?  It certainly sounds similar.  Looking at the
code, it's not obvious to me that they're the same.
Comment 3 Shawn Willden 2003-08-07 01:39:54 UTC
I should have done a little testing first, then responded.  Equalize
and auto-level are different operations.  Equalize produces almost
perfectly flat histograms, and the effect of that on most images isn't
very pleasant.  Auto-level just cuts off the ends of each histogram
and then stretches the rest across the full range out output levels. 
That is unpleasant for some images, but very nice for most.
Comment 4 Shawn Willden 2003-08-07 14:24:35 UTC
I think I've got this figured out; I'll post a patch shortly.  (This
is just so no one else wastes any time looking at it until I either
succeed or give up :) ).
Comment 5 Shawn Willden 2003-08-09 06:30:51 UTC
Created attachment 19053 [details] [review]
Patch to add levels_auto to PDB
Comment 6 Sven Neumann 2003-08-31 15:24:56 UTC
Should be considered for inclusion in 1.3.
Comment 7 Sven Neumann 2003-08-31 15:43:15 UTC
2003-08-31  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/color.pdb: applied a patch from Shawn Willden
	that adds the new PDB function levels_auto.

	* app/pdb/color_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpcolor_pdb.[ch]: regenerated.
Comment 8 Sven Neumann 2003-09-02 00:04:38 UTC
*** Bug 84835 has been marked as a duplicate of this bug. ***