Examples of FileImageOutputStream


Examples of javax.imageio.stream.FileImageOutputStream

    if (!iter.hasNext()) {
      iter = ImageIO.getImageWriters(spec,"PNG");
    }
    if (iter.hasNext()) {
      ImageWriter writer = (ImageWriter) iter.next();
      FileImageOutputStream fios = new FileImageOutputStream(new File(tmpFile));
      writer.setOutput(fios);
      writer.write(pBufferedImage);
      fios.close();
      writer.dispose();
    }
    return tmpFile;
  }
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

  }

  public static void pegaImagemByURL(String u, File d) throws IOException
  {
    ImageWriter iw = ImageIO.getImageWritersByFormatName("jpeg").next();
    iw.setOutput(new FileImageOutputStream(d));

    ImageWriteParam iwParam = iw.getDefaultWriteParam();
    iwParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    iwParam.setCompressionQuality(0.9f);
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

            scaledImage = image;
        }

        File f = new File(root, name);

        ImageOutputStream out = new FileImageOutputStream(f);

        format.setOutput(out);
        format.write(scaledImage);
        out.flush();
        out.close();
    }
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (RandomAccessFile.class.isInstance(input)) {
            return new FileImageOutputStream((RandomAccessFile) input);
        }
        throw new IllegalArgumentException(
                "input is not an instance of java.io.RandomAccessFile");
    }
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (File.class.isInstance(input)) {
            return new FileImageOutputStream((File) input);
        }
        throw new IllegalArgumentException("input is not an instance of java.io.File");
    }
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

     */
    public AVIOutputStream(File file, VideoFormat format) throws IOException {
        if (file.exists()) {
            file.delete();
        }
        out = new FileImageOutputStream(file);

        if (format == null) {
            throw new IllegalArgumentException("format must not be null");
        }

View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    public ImageOutputStream createOutputStreamInstance(Object output,
                                                        boolean useCache,
                                                        File cacheDir) {
        if (output instanceof File) {
            try {
                return new FileImageOutputStream((File)output);
            } catch (Exception e) {
                e.printStackTrace();
                return null;
            }
        } else {
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    public ImageOutputStream createOutputStreamInstance(Object output,
                                                        boolean useCache,
                                                        File cacheDir) {
        if (output instanceof RandomAccessFile) {
            try {
                return new FileImageOutputStream((RandomAccessFile)output);
            } catch (Exception e) {
                e.printStackTrace();
                return null;
            }
        } else {
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    public ImageOutputStream createOutputStreamInstance(Object output,
                                                        boolean useCache,
                                                        File cacheDir) {
        if (output instanceof File) {
            try {
                return new FileImageOutputStream((File)output);
            } catch (Exception e) {
                e.printStackTrace();
                return null;
            }
        } else {
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    public ImageOutputStream createOutputStreamInstance(Object output,
                                                        boolean useCache,
                                                        File cacheDir) {
        if (output instanceof RandomAccessFile) {
            try {
                return new FileImageOutputStream((RandomAccessFile)output);
            } catch (Exception e) {
                e.printStackTrace();
                return null;
            }
        } else {
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.