| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static byte[] | |
| private static IIOMetadataNode | Returns: the existing or just created child nodethe parent node parentNode, String name of the child node name)Gets the named child node, or creates and attaches it. |
| private static boolean | Returns: true if this image has an ICC profile, that is different from sRGB.the image to analyse image)Determine if the given image has a ICC profile that should be embedded. |
| private static void | |
| public static boolean | Returns: true if the image file was produced, false if there was an error.the image to be written image, String used to construct the filename for the individual image.
Its suffix will be used as the image format. filename, int the resolution in dpi (dots per inch) to be used in metadata dpi)Writes a buffered image to a file using the given image format. |
| public static boolean | Returns: true if the image file was produced, false if there was an error.the image to be written image, String used to construct the filename for the individual image. Its suffix will be
used as the image format. filename, int the resolution in dpi (dots per inch) to be used in metadata dpi, float quality to be used when compressing the image (0 <
compressionQuality < 1.0f). See compressionQuality)ImageWriteParam#setCompressionQuality(float) for
more details.Writes a buffered image to a file using the given image format. |
| public static boolean | Returns: true if the image file was produced, false if there was an error.the image to be written image, String the target format (ex. "png") formatName, OutputStream the output stream to be used for writing output)Writes a buffered image to a file using the given image format. |
| public static boolean | Returns: true if the image file was produced, false if there was an error.the image to be written image, String the target format (ex. "png") formatName, OutputStream the output stream to be used for writing output, int the resolution in dpi (dots per inch) to be used in metadata dpi)Writes a buffered image to a file using the given image format. |
| public static boolean | Returns: true if the image file was produced, false if there was an error.the image to be written image, String the target format (ex. "png") formatName, OutputStream the output stream to be used for writing output, int the resolution in dpi (dots per inch) to be used in metadata dpi, float quality to be used when compressing the image (0 <
compressionQuality < 1.0f). See compressionQuality)ImageWriteParam#setCompressionQuality(float) for
more details.Writes a buffered image to a file using the given image format. |
| public static boolean | Returns: true if the image file was produced, false if there was an error.the image to be written image, String the target format (ex. "png") formatName, OutputStream the output stream to be used for writing output, int the resolution in dpi (dots per inch) to be used in metadata dpi, float quality to be used when compressing the image (0 <
compressionQuality < 1.0f). See compressionQuality, String ImageWriteParam#setCompressionQuality(float) for
more details.Advanced users only, and only relevant for TIFF
files: If null, save uncompressed; if empty string, use logic explained
above; other valid values are found in the javadoc of
TIFFImageWriteParam. compressionType)Writes a buffered image to a file using the given image format. |
| LOG | back to summary |
|---|---|
| private static final Log LOG Log instance | |
| ImageIOUtil | back to summary |
|---|---|
| private ImageIOUtil() | |
| getAsDeflatedBytes | back to summary |
|---|---|
| private static byte[] getAsDeflatedBytes(ICC_Profile profile) throws IOException | |
| getOrCreateChildNode | back to summary |
|---|---|
| private static IIOMetadataNode getOrCreateChildNode(IIOMetadataNode parentNode, String name) Gets the named child node, or creates and attaches it.
| |
| hasICCProfile | back to summary |
|---|---|
| private static boolean hasICCProfile(BufferedImage image) Determine if the given image has a ICC profile that should be embedded.
| |
| setDPI | back to summary |
|---|---|
| private static void setDPI(IIOMetadata metadata, int dpi, String formatName) throws IIOInvalidTreeException | |
| writeImage | back to summary |
|---|---|
| public static boolean writeImage(BufferedImage image, String filename, int dpi) throws IOException Writes a buffered image to a file using the given image format. The compression is set for
maximum compression for PNG and maximum quality for all other file formats. See
| |
| writeImage | back to summary |
|---|---|
| public static boolean writeImage(BufferedImage image, String filename, int dpi, float compressionQuality) throws IOException Writes a buffered image to a file using the given image format.
See
| |
| writeImage | back to summary |
|---|---|
| public static boolean writeImage(BufferedImage image, String formatName, OutputStream output) throws IOException Writes a buffered image to a file using the given image format. The compression is set for
maximum compression for PNG and maximum quality for all other file formats. See
| |
| writeImage | back to summary |
|---|---|
| public static boolean writeImage(BufferedImage image, String formatName, OutputStream output, int dpi) throws IOException Writes a buffered image to a file using the given image format. The compression is set for
maximum compression for PNG and maximum quality for all other file formats. See
| |
| writeImage | back to summary |
|---|---|
| public static boolean writeImage(BufferedImage image, String formatName, OutputStream output, int dpi, float compressionQuality) throws IOException Writes a buffered image to a file using the given image format. Compression is fixed for PNG, GIF, BMP and WBMP, dependent of the compressionQuality parameter for JPG, and dependent of bit count for TIFF (a bitonal image will be compressed with CCITT G4, a color image with LZW). Creating a TIFF image is only supported if the jai_imageio library (or equivalent) is in the class path.
| |
| writeImage | back to summary |
|---|---|
| public static boolean writeImage(BufferedImage image, String formatName, OutputStream output, int dpi, float compressionQuality, String compressionType) throws IOException Writes a buffered image to a file using the given image format. Compression is fixed for PNG, GIF, BMP and WBMP, dependent of the compressionQuality parameter for JPG, and dependent of bit count for TIFF (a bitonal image will be compressed with CCITT G4, a color image with LZW). Creating a TIFF image is only supported if the jai_imageio library is in the class path.
| |