Sign up now! · Forgot password?
RSS/Atom feed Twitter

Converting 8-bit integer color palettes to floating point

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

Converting 8-bit integer color palettes to floating point Elle Stone 08 Mar 21:44
Elle Stone
2019-03-08 21:44:35 UTC (3 months ago)

Converting 8-bit integer color palettes to floating point

Hi All,

In these two GIMP bug reports:

* Support for high bit depth RGB (and LCH?) color palettes for painting https://gitlab.gnome.org/GNOME/gimp/issues/1328

* Add support for Swatchbooker's SBZ colour palette format https://gitlab.gnome.org/GNOME/gimp/issues/2011

are discussions regarding either *converting* GIMP code to use SwatchBooker for high bit depth color palettes, or else *keeping* GIMP GPL palette code (updated to use floating point), and also adding support for importing/exporting SwatchBooker color palettes.

Here's the current git repository for SwatchBooker, maintained by Olivier Berten: https://github.com/olivierberten/SwatchBooker

Adding support for importing/exporting SwatchBooker color palettes seems like a really good idea for reasons given by "Christoph S" in bug #2011.

But converting all GIMP color palette code to use SwatchBooker maybe isn't such a good idea given the reality that maintainers of various free/libre projects do come and go as their lives place various demands on time and energy.

Anyway, I did write some barebones working code to convert GIMP color palette code from 8-bit integer to floating point. Details and the patches are in bug #1328.

My floating point palette code isn't finished. Well, it's sufficiently finished for my own needs. But I drastically simplified the palette code by removing everything except the core code for opening and saving a palette to/from a GPL file. Otherwise I'd still by trying to figure out which of the many the palette-related files/functions/variables does what.

If the GIMP team reaches a consensus to *keep* GIMP's GPL palette code and just update it to be floating point (and of course add support for importing/exporting SwatchBooker assets) - instead of *replacing* GIMP's GPL palette code with SwatchBooker - then I'd go ahead and try to add back into my working patch the various non-core palette functions that I removed to make it easier to figure out the core palette code.

Best regards, Elle