no.hiof.imagepr.tools
Class ImageIOTools

java.lang.Object
  extended byno.hiof.imagepr.tools.ImageIOTools

public class ImageIOTools
extends java.lang.Object

ImageIOTools is a class which includes a static method for saving JPEG images.

Author:
Per-Olav Rusås

Constructor Summary
ImageIOTools()
           
 
Method Summary
static void saveAsJPEG(java.awt.image.BufferedImage bufim, java.lang.String filename, float quality)
          Saves a BufferedImage in a JPEG-file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIOTools

public ImageIOTools()
Method Detail

saveAsJPEG

public static void saveAsJPEG(java.awt.image.BufferedImage bufim,
                              java.lang.String filename,
                              float quality)
                       throws java.io.IOException
Saves a BufferedImage in a JPEG-file. A low value of the quality value results in a small file. An often used value for the quality is 0.75.

Parameters:
quality - The quality of the image from 0 to 1.
Throws:
java.io.IOException