Package javax.imageio

Examples of javax.imageio.ImageWriter.encode()


            PNGEncodeParam param = PNGEncodeParam.getDefaultEncodeParam( bi );

            ImageEncoder encoder = ImageCodec.createImageEncoder( "PNG", out, param ); //NON-NLS
            try {
                // Writes it to a file as a .png
                encoder.encode( bi );
            } catch (IOException e) {
                throw new IllegalStateException("IOException error.", e);
            } catch (NullPointerException npe) {
                throw new IllegalStateException("Could not encode buffered image because it was null.", npe);
            }
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.