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

Gimp Palette tools

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.

Gimp Palette tools John McCawley 19 Aug 20:49
John McCawley
2005-08-19 20:49:29 UTC (over 18 years ago)

Gimp Palette tools

Hello all,

I apologize if what I'm asking has been covered, I tried searching the archives at https://lists.xcf.berkeley.edu/lists/gimp-developer/ but it seems to be broken.

I am currently writing a game that makes heavy use of (256 color) palette tricks to implement things like multiple colors for the same in-game bitmap, player sprite customization etc. Because of this, I need a lot of palette manipulation functionality, and from what I can see, Gimp does not currently provide what I need. I wrote a few external programs that do what I need, but I thought it would be nice if I could contribute my palette manipulation code to Gimp.

The functionality I implemented because I could not figure out how to do it in Gimp is:

1) Palette shift: Shift all palette entries over by X, all bitmap data retains its current color (i.e. their palette index shifts as well)

2) Palette merge: Copy palette entries x thru y of image 1 into range a thru b of image 2. (In Gimp, this could simply be implemented by copying a range of palette entries with the mouse and pasting them into the destination palette)

3) "offlimits" palette sections: if pasting RGB data into a 256 color image, do not allow it to use indices x-y in the destination image's palette (used to keep a certain palette section reserved)

Finally, and this is somewhat related to number 2, To create a new palette in Gimp, I go to palettes and go to "Import", I am then able to create a gradient palette that takes up X number of colors. The problem is that if I make one with, say, 64 colors, there is no real way (I have found) in Gimp to then combine this with another palette...i.e. how would I combine four 64 entry palettes? This might be a problem where I'm not RTFM, but if not, it's functionality I would like to add.

Anyway, I'm a solid programmer with over 10 years of C under my belt, so I'm capable of contributing, but I figured I'd mention what I'm considering here before delving in. It's possible that the functionality is already there, or already being developed, or otherwise isn't worth pursuing.

Thoughts?

John