Gimp-Forum.net
Algorithm for indexed image mode - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Algorithm for indexed image mode (/Thread-Algorithm-for-indexed-image-mode)



Algorithm for indexed image mode - lesolorzanov - 07-27-2023

I've always been marveled at GIMP and very happy that it's so accessible.

I was wondering if I can ask, I'd like to know how indexing works and creation of a palette, it happens so quickly that I was wondering if anyone could tell me (even if roughly) how this indexing works. Or even point me to a an article or the name of the creator of this particular algorithm.

I attach an image of what I am talking about.

[attachment=10136]


RE: Algorithm for indexed image mode - Ofnuts - 07-27-2023

Source code is here: https://gitlab.gnome.org/GNOME/gimp/-/blob/master/app/core/gimpimage-convert-indexed.c


RE: Algorithm for indexed image mode - PixLab - 07-27-2023

(07-27-2023, 02:05 PM)Ofnuts Wrote: Source code is here: https://gitlab.gnome.org/GNOME/gimp/-/blob/master/app/core/gimpimage-convert-indexed.c

How fantastic is open source!
A simple link and the OP got a lot more than expected Big Grin


RE: Algorithm for indexed image mode - denzjos - 07-27-2023

Some information about palettes and indexed colors :
https://www.scantips.com/palettes.html
https://en.wikipedia.org/wiki/Indexed_color
https://en.wikipedia.org/wiki/List_of_8-bit_computer_hardware_graphics