Package org.geotools.image

Examples of org.geotools.image.ImageWorker.writePNG()


            SampleModel sm = image.getSampleModel();
            int numBits = sm.getSampleSize(0);
            // png acceleration only works on 2 bit and 8 bit images, crashes on 4 bits
            boolean nativeAcceleration = PNGNativeAcc.booleanValue() && !(numBits > 1 && numBits < 8);
            ImageWorker iw = new ImageWorker(image);
            iw.writePNG(outStream, "FILTERED", quality, nativeAcceleration, false);
            RasterCleaner.addImage(iw.getRenderedImage());           
        }

        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Writing png image ... done!");
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.