Converting 8-bit integer color palettes to floating point

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting 8-bit integer color palettes to floating point

Elle Stone
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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Converting 8-bit integer color palettes to floating point

Elle Stone
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:    [hidden email]
> 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
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list