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 51563 - "Count colors" option
"Count colors" option
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal enhancement
: 2.0
Assigned To: GIMP Bugs
GIMP Bugs
: 113648 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-03-02 09:25 UTC by root
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
ccanalyze.c ported to Gimp 1.3.x (16.46 KB, text/plain)
2003-07-27 12:42 UTC, Hans Breuer
Details

Description root 2001-03-02 09:25:19 UTC
I really could use a "count colors" feature, like has been in Paint
Shop Pro for a while. This just looks over the entire image (but you
could have it look over a selection, the visible layers, ...) and
tallies up all colors that are unique (ie, same RGB used by multiple
pixels), and gives the user a count of colors. This can then be fed
into the "indexed" depth converter to make the smallest possible
palette without losing any image quality.

Of course, this could also be integrated directly into the indexed
depth converter, so you could just put a special value in the "# of
colors" field (like 0) and have gimp automatically choose the optimal
palette without any quality loss.
Comment 1 Raphaël Quinet 2001-03-02 17:29:40 UTC
If you convert the image to indexed mode and specify the maximum (256)
for the number of colors, the GIMP will allocate at most 256 colors,
but not more than the number of colors included in the RGB image.
If you take any RGB image, convert it to indexed mode, then look at
"<Image> -> View -> Info Window...", you will see the number of colors
that have been allocated.

Do you think that a "Count Colors" option would be more useful than
this?  Please reply to this so that I know if the bug should remain
open or if it can be closed.
Comment 2 Raphaël Quinet 2001-04-26 18:10:26 UTC
Re-assigning all Gimp bugs to default component owner (Gimp bugs list)
Comment 3 Sven Neumann 2001-06-19 15:01:09 UTC
The indexed conversion in Gimp is designed to give the best possible
results without the need for user intervention. It will automatically
use the lowest possible number of colors without degrading image
quality. If indexed-conversion is the only use for a "Count Colors"
option, then we simply don't need it.
Comment 4 Sven Neumann 2001-06-30 18:31:52 UTC
reassigning to current CVS since it's a wishlist item
Comment 5 Raphaël Quinet 2001-08-10 09:24:02 UTC
Let's add the following as a wishlist item: add a "Count Colors"
option that works in all modes (RGB, grayscale, indexed) and counts
the number of unique colors in the image.  It could be useful to
know the number of unique colors before converting the image to
indexed mode, in order to guess how many of them would be lost in the
conversion (if their number is larger than 256).

This option should probably be combined with an histogram, since the
only way to count the number of unique colors is to build a list of
them.  The only problem is how to represent a RGB color histogram in
4 dimensions...
Comment 6 Hans Breuer 2002-12-06 14:34:36 UTC
There is a pug-in called 'ccanalyze' which does 
provide this feature. It lives under :
<Image>/Colors/Colorcube Analysis
if found in the plug-in registry at:
http://registry.gimp.org/plugin?id=363

Comment 7 Alan Horkan 2003-02-11 21:26:48 UTC
I noticed this while reading the TODO file and i thought it was
strange that it was not mentioned here
http://cvs.gnome.org/lxr/source/gimp/TODO#308

Ability to get an exact count of the total number of colors in the image:

Xpm plugin has an algo to do this. Should be trivial to add this to
the core.
Comment 8 Sven Neumann 2003-02-11 22:07:57 UTC
As you could have easily found out using Bonsai, the TODO file hasn't
been updated in years. It is completely obsoleted, deprecated and I
finally removed it.
Comment 9 Raphaël Quinet 2003-05-25 08:08:20 UTC
*** Bug 113648 has been marked as a duplicate of this bug. ***
Comment 10 LIVINE Christin 2003-05-26 18:56:09 UTC
Hi,

First, excuse me if I make a mistake, I use French UI.

On MSWin Gimp 1.2.3 only, this function is accessable with 
picture/colour/colorcube analysis.

But maybe it should be in information windows.

NOTA : I copy this info in bug 113648.
Comment 11 Alan Horkan 2003-05-27 19:45:16 UTC
"<Image>/Image/Colors/Colorcube analysis"
http://registry.gimp.org/plugin?id=363

Thanks for the information, it is good to know that the feature is
available.  I checked and old version of gimp-1.2 on Linux, it does
not include the Colorcube Analysis Plugin, I will try and remember to
check gimp-1.3 on my home machine later.  
Does the fact that the feature is already avialable make this a
usabiliy bug[1], or a please ship this plugin[2] request?  

Even though the ColorCube Analysis plugin does a lot more than just
Count Colours, it would probably help a lot of users if it were
labelled as "Count Colours" (or Count Colors ;).  
I realise that this might be unnacceptable dumbing down, and I would
welcome a better solution.  

[1] add keyword usability
[2] move to component Plugins
Comment 12 Dave Neary 2003-07-26 10:33:33 UTC
Bumping a bunch of enhancement requests which will not be done by the feature
freeze to Future. 

Dave.
Comment 13 Hans Breuer 2003-07-27 12:40:59 UTC
This looks like trampling an extremely low hanging
fruit. Why not simply include the plug-in in The
Gimp ? A ported to 1.3.x version will follow.
So it's just a matter of allowing it to go in.
Comment 14 Hans Breuer 2003-07-27 12:42:55 UTC
Created attachment 18645 [details]
ccanalyze.c ported to Gimp 1.3.x
Comment 15 Dave Neary 2003-07-27 17:03:55 UTC
Adding PATCH keyword so that this gets done before the freeze.

Dave.
Comment 16 Manish Singh 2003-07-31 01:13:03 UTC
Added a further cleaned up version, plus support for grayscale and
non-interactive mode.

2003-07-30  Manish Singh  <yosh@gimp.org>
 
        * plug-ins/common/Makefile.am
        * plug-ins/common/plugin-defs.pl
        * plug-ins/common/ccanalyze.c: new plug-in, Colorcube Analysis
        (counts colors in an image, an often requested feature)