Examples of FileImageOutputStream


Examples of javax.imageio.stream.FileImageOutputStream

    // instantiate an ImageWriteParam object with default compression options
    ImageWriteParam iwp = writer.getDefaultWriteParam();
    iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    iwp.setCompressionQuality(quality);
    File file = new File(fileName);
    FileImageOutputStream output = new FileImageOutputStream(file);
    writer.setOutput(output);
    IIOImage image = new IIOImage(bufferedImage, null, null);
    writer.write(null, image, iwp);
    writer.dispose();
  }
View Full Code Here

Examples of javax.imageio.stream.FileImageOutputStream

    ImageWriteParam iwp = writer.getDefaultWriteParam();
    iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    iwp.setCompressionQuality(quality);
   
    //output.getParentFile().mkdirs();
    FileImageOutputStream outputStream = new FileImageOutputStream(output);
    writer.setOutput(outputStream);
    IIOImage ioImage = new IIOImage(scaledImage, null, null);
    writer.write(null, ioImage, iwp);
    writer.dispose();
  }
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.