Package org.apache.batik.refimpl.transcoder

Examples of org.apache.batik.refimpl.transcoder.ImageTranscoder.createImage()


        // Begin encoding to PNG image file
        ImageTranscoder transcoder
            = (ImageTranscoder)getTranscoder();

        Dimension size = painter.getSize();
        BufferedImage buf = transcoder.createImage(size.width, size.height);
        Graphics2D g = buf.createGraphics();
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                           RenderingHints.VALUE_ANTIALIAS_ON);

        g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
View Full Code Here


                content += s;
                continue;
            }
            ImageTranscoder transcoder
                = (ImageTranscoder)getTranscoder();
            BufferedImage bfDiff = transcoder.createImage(3*bfRef.getWidth(), bfRef.getHeight());
            Graphics2D g = bfDiff.createGraphics();
            //g.setPaint(Color.white);
            //g.fillRect(0, 0, bfDiff.getWidth(), bfDiff.getHeight());
            g.dispose();
            diffBufferedImage(bfRef.getRaster(), bfNew.getRaster(), bfDiff.getRaster());
View Full Code Here

                break;
            }
           
            ImageTranscoder transcoder
                = (ImageTranscoder)getTranscoder();
            BufferedImage bfDiff = transcoder.createImage(2*bfRef.getWidth(), 2*bfRef.getHeight());

            Graphics2D g = bfDiff.createGraphics();
            // g.setPaint(transcoder.getBackgroundPaint());
            // g.fillRect(0, 0, bfDiff.getWidth(), bfDiff.getHeight());
            g.dispose();
View Full Code Here

                BufferedImage buffer = canvas.getBuffer();
                // create a BufferedImage of the appropriate type
                int w = buffer.getWidth();
                int h = buffer.getHeight();
                final ImageTranscoder trans = new PngTranscoder();
                final BufferedImage img = trans.createImage(w, h);
                // paint the buffer to the image
                Graphics2D g2d = img.createGraphics();
                g2d.drawImage(buffer, null, 0, 0);
                new Thread() {
                    public void run() {
View Full Code Here

                BufferedImage buffer = canvas.getBuffer();
                // create a BufferedImage of the appropriate type
                int w = buffer.getWidth();
                int h = buffer.getHeight();
                final ImageTranscoder trans = new JpegTranscoder();
                final BufferedImage img = trans.createImage(w, h);
                // paint the buffer to the image
                Graphics2D g2d = img.createGraphics();
                g2d.drawImage(buffer, null, 0, 0);
                new Thread() {
                    public void run() {
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.