public final class ImageWriterUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
saveAsFile(RenderedImage bitmap,
int resolution,
File outputFile,
String mime)
Saves a RenderedImage as a file.
|
static void |
saveAsPNG(RenderedImage bitmap,
File outputFile)
Saves a RenderedImage as a PNG file with 96 dpi.
|
static void |
saveAsPNG(RenderedImage bitmap,
int resolution,
File outputFile)
Saves a RenderedImage as a PNG file.
|
public static void saveAsPNG(RenderedImage bitmap, File outputFile) throws IOException
bitmap
- the bitmap to encodeoutputFile
- the target fileIOException
- in case of an I/O problempublic static void saveAsPNG(RenderedImage bitmap, int resolution, File outputFile) throws IOException
bitmap
- the bitmap to encoderesolution
- the bitmap resolutionoutputFile
- the target fileIOException
- in case of an I/O problempublic static void saveAsFile(RenderedImage bitmap, int resolution, File outputFile, String mime) throws IOException
bitmap
- the bitmap to encoderesolution
- the bitmap resolutionoutputFile
- the target filemime
- the MIME type of the target fileIOException
- in case of an I/O problemCopyright © 2021 Apache Software Foundation. All rights reserved.