RSS/Atom feed Twitter
Site is read-only, email is disabled

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.

2 of 2 messages 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
  Converting 8-bit integer color palettes to floating point Elle Stone 03 Jun 18:48
Elle Stone
2019-03-08 21:44:35 UTC (about 5 years 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

Elle Stone
2019-06-03 18:48:57 UTC (almost 5 years ago)

Converting 8-bit integer color palettes to floating point

Hi All,

It seems to me - I could be wrong - that it would be very easy to add a line to the palette files that specifies the babl format, perhaps even the babl format with space, that would allow, for example, user A to save 8-bit sRGB indexed image RGB channel values along with the Alpha channel values, and user B to save 32f LCh values with no Alpha channel information, and etc. And then add code that "decodes" the palette color entries according to the babl format. Yes? No?

Best regards, Elle

On 03/08/2019 04:44 PM, Elle Stone wrote:

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
_______________________________________________ gimp-developer-list mailing list
List address:    gimp-developer-list@gnome.org List membership:
https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives:   https://mail.gnome.org/archives/gimp-developer-list

https://ninedegreesbelow.com
Color management and free/libre photography