Examples of PngEncoder


Examples of com.keypoint.PngEncoder

     */
    public byte[] encode(BufferedImage bufferedImage) throws IOException {
        if (bufferedImage == null) {
            throw new IllegalArgumentException("Null 'image' argument.");
        }
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        return encoder.pngEncode();
    }
View Full Code Here

Examples of com.keypoint.PngEncoder

            throw new IllegalArgumentException("Null 'image' argument.");
        }
        if (outputStream == null) {
            throw new IllegalArgumentException("Null 'outputStream' argument.");
        }
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        outputStream.write(encoder.pngEncode());
    }
View Full Code Here

Examples of com.keypoint.PngEncoder

     */
    public byte[] encode(BufferedImage bufferedImage) throws IOException {
        if (bufferedImage == null) {
            throw new IllegalArgumentException("Null 'image' argument.");
        }
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        return encoder.pngEncode();
    }
View Full Code Here

Examples of com.keypoint.PngEncoder

            throw new IllegalArgumentException("Null 'image' argument.");
        }
        if (outputStream == null) {
            throw new IllegalArgumentException("Null 'outputStream' argument.");
        }
        PngEncoder encoder = new PngEncoder(bufferedImage, this.encodingAlpha,
                0, this.quality);
        outputStream.write(encoder.pngEncode());
    }
View Full Code Here

Examples of com.sun.jimi.core.encoder.png.PNGEncoder

                        options.setQuality(Math.round(quality * 100));
                        source.setOptions(options);
                    }
                } else if ("png".equals(type)) {
                    // PNG
                    encoder = new PNGEncoder();
                    // the alpha parameter does mean something here:
                    ((PNGEncoder) encoder).setAlpha(new Boolean(alpha));
                    PNGOptions options = new PNGOptions();
                    // TODO: Use quality for CompressionType control, similar to ImageIOWrapper (?)
                    options.setCompressionType(PNGOptions.COMPRESSION_MAX);
View Full Code Here

Examples of keypoint.PngEncoder

        frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        waitD.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        // save!
        final int filter = 0; // 0 - no filter; 1 - sub; 2 - up
        final int compressionLevel = 9; // 0 to 9 with 0 being no compression
        final PngEncoder png = new PngEncoder(bv.getEntireBoardImage(),
                PngEncoder.NO_ALPHA, filter, compressionLevel);
        try {
            final FileOutputStream outfile = new FileOutputStream(curfileImage);
            byte[] pngbytes;
            pngbytes = png.pngEncode();
            if (pngbytes == null) {
                System.out.println("Failed to save board as image:Null image"); //$NON-NLS-1$
            } else {
                outfile.write(pngbytes);
            }
View Full Code Here

Examples of keypoint.PngEncoder

        frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        waitD.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        // save!
        int filter = 0; // 0 - no filter; 1 - sub; 2 - up
        int compressionLevel = 9; // 0 to 9 with 0 being no compression
        PngEncoder png = new PngEncoder(bv.getEntireBoardImage(),
                PngEncoder.NO_ALPHA, filter, compressionLevel);
        try {
            FileOutputStream outfile = new FileOutputStream(curfileImage);
            byte[] pngbytes;
            pngbytes = png.pngEncode();
            if (pngbytes == null) {
                System.out.println("Failed to save board as image:Null image"); //$NON-NLS-1$
            } else {
                outfile.write(pngbytes);
            }
View Full Code Here

Examples of org.jemmy.image.PNGEncoder

                        Object result = makeAnOperationLocally(method, params,
                                paramClasses);
                        if (result instanceof BufferedImage) {
                            outputStream.writeObject("image");
                            BufferedImage image = BufferedImage.class.cast(result);
                            new PNGEncoder(outputStream, PNGEncoder.COLOR_MODE)
                                    .encode(image, false);
                            //ImageIO.write(image, "png", outputStream);
                        } else {
                            outputStream.writeObject("OK");
                            outputStream.writeObject(result);
View Full Code Here

Examples of org.jemmy.image.PNGEncoder

                        Object result = makeAnOperationLocally(method, params,
                                paramClasses);
                        if (result instanceof BufferedImage) {
                            outputStream.writeObject("image");
                            BufferedImage image = BufferedImage.class.cast(result);
                            new PNGEncoder(outputStream, PNGEncoder.COLOR_MODE)
                                    .encode(image, false);
                            //ImageIO.write(image, "png", outputStream);
                        } else {
                            outputStream.writeObject("OK");
                            outputStream.writeObject(result);
View Full Code Here

Examples of org.netbeans.jemmy.util.PNGEncoder

    /**
     * Saves an image into a PNG image file.
     */
    public void save(BufferedImage image, String fileName) throws IOException{
        new PNGEncoder(new BufferedOutputStream(new FileOutputStream(fileName)),
                       PNGEncoder.COLOR_MODE).
            encode(image);
    }
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.