[Gimp-developer] Doing an action for each color in an indexed color-palette
Kevin Cozens
kevin at ve3syb.ca
Thu Jul 5 16:52:33 PDT 2007
Roberto Uhlig wrote:
> but it doesn't work correct on my xp-pc with gimp GIMP 2.3.10.
[snip]
> aref brings sometimes negative eg. -51 values. In that case you have to ad
> 256 to become the realy color-value for blue. So I implementet (set! blue
> (aref color-map (+ 2 index))) (if (< blue 0) (set! blue (+ blue 256))) and
> it does his job. I've tested it only under WINXP with Gimp 2.3.10 and also
> with 2.2.11.
INT8 and INT8ARRAY used to be signed values but these types were changed
to unsigned a few versions back in the development version of GIMP. They are
still signed entities in the 2.2 series of GIMP so storing values > 127 will
read back as negatives.
Aref doesn't return negative values in the current development version of GIMP
(built from SVN).
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
More information about the Gimp-developer
mailing list