Examples of Gif89Encoder


Examples of com.dotcms.repackage.net.jmge.gif.Gif89Encoder

public class ImageUtil {

  public static void encodeGIF(BufferedImage image, OutputStream out)
    throws IOException {

    Gif89Encoder encoder = new Gif89Encoder(image);

    encoder.encode(out);
  }
View Full Code Here

Examples of org.vfny.geoserver.wms.responses.map.gif.Gif89Encoder

        {
            //GIFOutputStream.writeGIF(outStream, image,GIFOutputStream.STANDARD_256_COLORS, mapCtx.getBgColor());
              //DJB: note I had to make colorTable in the encoder source public to do this!
              //DJB: to add a function "return colorTable.ciLookup.getPaletteIndex(rgb);" to Gif89Encoder
         
          Gif89Encoder gifenc = new Gif89Encoder(image,mapCtx.getBgColor(),2 ); // 2= colour reduction pixel sample factor (1=look at all pixels, but its slow)
            gifenc.setComments("produced by Geoserver");
           
            gifenc.getFrameAt(0).setInterlaced(false);
            gifenc.encode(outStream);
        }
        else
        {
           // GIFOutputStream.writeGIF(outStream, image);
          Gif89Encoder gifenc = new Gif89Encoder(image,null,2);// 2= colour reduction pixel sample factor (1=look at all pixels, but its slow)
            gifenc.setComments("produced by Geoserver");
           // gifenc.setTransparentIndex(transparent_index);
            gifenc.getFrameAt(0).setInterlaced(false);
            gifenc.encode(outStream);
           
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.