Class ImageWriterUtil
- java.lang.Object
-
- org.apache.xmlgraphics.image.writer.ImageWriterUtil
-
public final class ImageWriterUtil extends java.lang.ObjectConvenience methods around ImageWriter for the most important tasks.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsaveAsFile(java.awt.image.RenderedImage bitmap, int resolution, java.io.File outputFile, java.lang.String mime)Saves a RenderedImage as a file.static voidsaveAsPNG(java.awt.image.RenderedImage bitmap, int resolution, java.io.File outputFile)Saves a RenderedImage as a PNG file.static voidsaveAsPNG(java.awt.image.RenderedImage bitmap, java.io.File outputFile)Saves a RenderedImage as a PNG file with 96 dpi.
-
-
-
Method Detail
-
saveAsPNG
public static void saveAsPNG(java.awt.image.RenderedImage bitmap, java.io.File outputFile) throws java.io.IOExceptionSaves a RenderedImage as a PNG file with 96 dpi.- Parameters:
bitmap- the bitmap to encodeoutputFile- the target file- Throws:
java.io.IOException- in case of an I/O problem
-
saveAsPNG
public static void saveAsPNG(java.awt.image.RenderedImage bitmap, int resolution, java.io.File outputFile) throws java.io.IOExceptionSaves a RenderedImage as a PNG file.- Parameters:
bitmap- the bitmap to encoderesolution- the bitmap resolutionoutputFile- the target file- Throws:
java.io.IOException- in case of an I/O problem
-
saveAsFile
public static void saveAsFile(java.awt.image.RenderedImage bitmap, int resolution, java.io.File outputFile, java.lang.String mime) throws java.io.IOExceptionSaves a RenderedImage as a file. The image format is given through the MIME type- Parameters:
bitmap- the bitmap to encoderesolution- the bitmap resolutionoutputFile- the target filemime- the MIME type of the target file- Throws:
java.io.IOException- in case of an I/O problem
-
-