Skip to main content

Convertinng a tiff image to a gif image using streams

1 reply [Last post]
Joined: 2006-02-14

I am tryinng to convert a tiff image to a gif using the byte array of the tiff image...can anybody help me please...i just can do it convertinng to bmp, but only this type...which is too big, i want the gif type.;..thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-06-23

To write the image to a GIF it has to be either a grayscale image or an RGB image with color expressed via a colormap, i.e., it must have an IndexColorModel. If you have a 3-band RGB image, you can convert it to a colormap image using the JAI ErrorDiffusion or OrderedDither operations. The LUT required for ErrorDiffusion may be generated using the ColorQuantizer operation. Or you can use the ColorQuantizer operation's image output which determines the color index using nearest color.