Skip to content

Wip/simon/palettestuff

Simon Budig requested to merge wip/simon/palettestuff into master

GimpImages in indexed mode used to store redundant information about the indexed palette. Mostly visible in the image->n_colors and image->colormap object members.

This merge request removes these properties. If something needs the colormap it gets generated on the fly from the ->palette. The API changes in that gimp_drawable_get_colormap() now returns a newly allocated memory block that needs to be freed by the caller.

The second commit removes the ->position entry from the GimpPaletteEntry. This always was EEKed upon and needed a bit of maintenance-code in gimppalette.c. We now calculate that dynamically by relying on the list ordering within the GimpPalette.

Merge request reports