Examples of writePNG()


Examples of it.geosolutions.imageio.plugins.png.PNGWriter.writePNG()

                        getSampleFileName(style));
                if(!sampleFile.getParentFile().exists()) {
                    sampleFile.getParentFile().mkdirs();
                }
                outStream = new FileOutputStream(sampleFile);
                writer.writePNG(image, outStream, 0.0f, FilterType.FILTER_NONE);
                removeStyleSampleInvalidation(style);
                return new Dimension(image.getWidth(), image.getHeight());
            } finally {
                if(outStream != null) {
                    outStream.close();
View Full Code Here

Examples of it.geosolutions.imageio.plugins.png.PNGWriter.writePNG()

        }
       
        RenderedImage output = null;
        // Image writing
        try {
            output =  writer.writePNG(image, outStream, quality, filterType);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Failed to encode the PNG", e);
            throw new ServiceException(e);
        }
       
View Full Code Here

Examples of it.geosolutions.imageio.plugins.png.PNGWriter.writePNG()

                    RenderedImage finalImage = image;
                    if(helper!=null){
                        finalImage = helper.prepareImage(image, type);
                    }                  
                    // Image writing
                    writer.writePNG(finalImage, stream, quality, filter);
                } else {
                    throw new IllegalArgumentException(
                            "Only an OutputStream can be provided to the PNGEncoder");
                }
            } catch (Exception e) {
View Full Code Here

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

Examples of org.tinyuml.ui.commands.PngExporter.writePNG()

            JOptionPane.ERROR_MESSAGE);
        }
      } else if (fileChooser.getFileFilter() == pngFilter) {
        try {
          PngExporter exporter = new PngExporter();
          exporter.writePNG(getCurrentEditor(), fileChooser.getSelectedFile());
        } catch (IOException ex) {
          JOptionPane.showMessageDialog(this, ex.getMessage(),
            getResourceString("error.exportgfx.title"),
            JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of org.tinyuml.ui.commands.PngExporter.writePNG()

            JOptionPane.ERROR_MESSAGE);
        }
      } else if (fileChooser.getFileFilter() == pngFilter) {
        try {
          PngExporter exporter = new PngExporter();
          exporter.writePNG(getCurrentEditor(), fileChooser.getSelectedFile());
        } catch (IOException ex) {
          JOptionPane.showMessageDialog(this, ex.getMessage(),
            getResourceString("error.exportgfx.title"),
            JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of org.tinyuml.ui.commands.PngExporter.writePNG()

            JOptionPane.ERROR_MESSAGE);
        }
      } else if (fileChooser.getFileFilter() == pngFilter) {
        try {
          PngExporter exporter = new PngExporter();
          exporter.writePNG(getCurrentEditor(), fileChooser.getSelectedFile());
        } catch (IOException ex) {
          JOptionPane.showMessageDialog(this, ex.getMessage(),
            getResourceString("error.exportgfx.title"),
            JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of org.tinyuml.ui.commands.PngExporter.writePNG()

            JOptionPane.ERROR_MESSAGE);
        }
      } else if (fileChooser.getFileFilter() == pngFilter) {
        try {
          PngExporter exporter = new PngExporter();
          exporter.writePNG(getCurrentEditor(), fileChooser.getSelectedFile());
        } catch (IOException ex) {
          JOptionPane.showMessageDialog(this, ex.getMessage(),
            getResourceString("error.exportgfx.title"),
            JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of org.tinyuml.ui.commands.PngExporter.writePNG()

            JOptionPane.ERROR_MESSAGE);
        }
      } else if (fileChooser.getFileFilter() == pngFilter) {
        try {
          PngExporter exporter = new PngExporter();
          exporter.writePNG(getCurrentEditor(), fileChooser.getSelectedFile());
        } catch (IOException ex) {
          JOptionPane.showMessageDialog(this, ex.getMessage(),
            getResourceString("error.exportgfx.title"),
            JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of org.tinyuml.ui.commands.PngExporter.writePNG()

            JOptionPane.ERROR_MESSAGE);
        }
      } else if (fileChooser.getFileFilter() == pngFilter) {
        try {
          PngExporter exporter = new PngExporter();
          exporter.writePNG(getCurrentEditor(), fileChooser.getSelectedFile());
        } catch (IOException ex) {
          JOptionPane.showMessageDialog(this, ex.getMessage(),
            getResourceString("error.exportgfx.title"),
            JOptionPane.ERROR_MESSAGE);
        }
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.