Package org.vfny.geoserver.wms.responses.map.gif

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

Related Classes of org.vfny.geoserver.wms.responses.map.gif.Gif89Encoder

Copyright © 2018 www.massapicom. 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.