GNOME Bugzilla – Bug 320660
Automated selection of a color on indexed colormap
Last modified: 2008-01-15 13:02:06 UTC
I would have the actual selected foreground color, e.g. with a color picker, selected at the Colormap-tool palette too; that means also, when I browse with the color picker an opened indexed image, the actual color index would be highlighted at the Colormap on the fly. Maybe it would cause some intense visual flickering at the Colormap display area, but maybe no and in any case, it should help to manipulate with the desired index color much easier then to watch out the index value from Color picker information window and to fill it in into the Colormap. Other information:
I think this is not going to happen, but in the development branch (GIMP 2.3), the "cursor" dialog shows this information if you toggle off the "sample merged" option. See bug 306230. I am going to resolve as WONTFIX, although this could equally well be resolved as a duplicate. If you are unhappy with this outcome, feel free to add more comments.
Sounds OK with me. It looks like I am not aware of all of the background around this feature, or the way this handling is made nowadays. It is free to implement in every way and at any desired time - if. Thank you for your comment.
Reopening because this is IMHO a very useful addition. In indexed images, you cannot use palettes in a sane way (unless made for that image of course), so people probably use the colormap where they would use a palette. I even suggest the color picker tool should do this unconditionally if any of "pick fg/bg color" is enabled.
My case is that I often switch an in RGB made image into an indexed image with the option to generate optimum palette and it happens that a color had changed (eg some special red color swithed to more-pink). So I get it with the color picker, and fill the color's index number from the info view into the colormap dialog, which highlights the index position etc. By this, I can tell, I never use and pre-prepared color palette - I would use this probably when working out an icon set or alike. But for me it is only the option to get a lossless compression image, if possible - considering image quality and file size... (web). I am open to this ability.
I agree with Mitch that this should be the behaviour of the Color Picker tool if it is set to "pick fg/bg color".
I have a somewhat hackish implementation on my disk. Will commit after cleanup.
Fixed in CVS: 2005-11-06 Michael Natterer <mitch@gimp.org> * app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked): when picking FG or BG color from an indexed layer, select its index in the colormap editor. Fixes bug #320660.
Reopen this please; it's broken in CVS HEAD. Debugging suggests that gimp_color_picker_tool_picked() is never even called (I've inserted g_warnings at various points and none of them appeared in the console output no matter what I did.); Actually, after a little more investigation, it seems that gimp_color_picker_tool_picked only gets called when the image is RGB, yet the only handling of color indices is in there..?!?!
Coincidentially, I just noticed today that selecting the palette index doesn't work when picking with a paint tool. However I can't reproduce your observation with the color picker tool. There is not restriction to indexed images. What tool do you use to pick? I'm already about to fix the non working paint tool picking...
Does this fix the bug? 2006-05-28 Michael Natterer <mitch@gimp.org> * app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_picked): removed all code except info dialog updating and chain up instead. * app/tools/gimpcolortool.c (gimp_color_tool_real_picked): newly added default implementation. Also updates the colormap dialog and picks into a palette. * app/tools/gimppainttool.c (gimp_paint_tool_color_picked): removed. The default impl. does this and much more now. Hopefully fixes bug #320660.
I tested whether there was a difference between CTRL-clicking with a paint tool or picking directly; It behaved the same. I also tried different paint tools. .. AHA. Sample merged was on (I assume then that the projection is always RGBA and that's why indices cannot be eyedropped when sample merged is on.). Sometimes the way that paint tools inherit the eyedropper settings is misleading. Anyway, that works great (and seems sounder structurally).
Ah cool. Closing as FIXED again then. (I agree that using other tools' options is not exactly obvious, we apparently just didn't find a better way to configure the paint tools' picking behavior).