Loads a JASC Pal files into an
IndexColorModel .
I made a real minor extension to the usual form of a JASC pal file which
allows us to provide values in the #ffffff or 0Xffffff hex form.
Note that this kind of file does not support explicitly setting transparent
pixel. However I have implemented this workaround, if you use less than 256
colors in your paletteInverter I will accordingly set the transparent pixel to the
first available position in the paletteInverter, which is palette_size. If you use
256 colors no transparency will be used for the image we generate.
Be aware that IrfanView does not always report correctly
the size of the palette it exports. Be ready to manually correct the number
of colors reported.
Here is an explanation of what a JASC pal file should look like:
JASC PAL file
and here is a list of other possible formats we could parse (in the future if
we have time or someone pays for it :-) )
alternative PAL file formats
author: Simone Giannecchini |