public class ImageIOHelper
extends java.lang.Object
Constructor and Description |
---|
ImageIOHelper() |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
convertImageData(java.awt.image.BufferedImage bi)
Converts
BufferedImage to ByteBuffer . |
static java.util.List<java.io.File> |
createTiffFiles(java.io.File imageFile,
int index)
Creates a list of TIFF image files from an image file.
|
static java.util.List<java.io.File> |
createTiffFiles(java.io.File imageFile,
int index,
boolean preserve)
Creates a list of TIFF image files from an image file.
|
static java.util.List<java.io.File> |
createTiffFiles(java.util.List<javax.imageio.IIOImage> imageList,
int index)
Creates a list of TIFF image files from a list of
IIOImage
objects. |
static java.util.List<java.io.File> |
createTiffFiles(java.util.List<javax.imageio.IIOImage> imageList,
int index,
int dpiX,
int dpiY) |
static java.util.List<javax.imageio.IIOImage> |
getIIOImageList(java.awt.image.BufferedImage bi)
Gets a list of
IIOImage objects for a
BufferedImage . |
static java.util.List<javax.imageio.IIOImage> |
getIIOImageList(java.io.File imageFile)
Gets a list of
IIOImage objects for an image file. |
static java.nio.ByteBuffer |
getImageByteBuffer(javax.imageio.IIOImage image)
Gets pixel data of an
IIOImage object. |
static java.nio.ByteBuffer |
getImageByteBuffer(java.awt.image.RenderedImage image)
Gets pixel data of an
RenderedImage object. |
static void |
mergeTiff(java.io.File[] inputImages,
java.io.File outputTiff)
Merges multiple images into one TIFF image.
|
static java.util.Map<java.lang.String,java.lang.String> |
readImageData(javax.imageio.IIOImage oimage)
Reads image meta data.
|
public static java.util.List<java.io.File> createTiffFiles(java.io.File imageFile, int index) throws java.io.IOException
imageFile
- input image fileindex
- an index of the page; -1 means all pages, as in a multi-page
TIFF imagejava.io.IOException
public static java.util.List<java.io.File> createTiffFiles(java.io.File imageFile, int index, boolean preserve) throws java.io.IOException
imageFile
- input image fileindex
- an index of the page; -1 means all pages, as in a multi-page
TIFF imagepreserve
- preserve compression modejava.io.IOException
public static java.util.List<java.io.File> createTiffFiles(java.util.List<javax.imageio.IIOImage> imageList, int index) throws java.io.IOException
IIOImage
objects.imageList
- a list of IIOImage
objectsindex
- an index of the page; -1 means all pagesjava.io.IOException
public static java.util.List<java.io.File> createTiffFiles(java.util.List<javax.imageio.IIOImage> imageList, int index, int dpiX, int dpiY) throws java.io.IOException
java.io.IOException
public static java.nio.ByteBuffer getImageByteBuffer(javax.imageio.IIOImage image) throws java.io.IOException
IIOImage
object.image
- an IIOImage
objectjava.io.IOException
public static java.nio.ByteBuffer getImageByteBuffer(java.awt.image.RenderedImage image) throws java.io.IOException
RenderedImage
object.image
- an RenderedImage
objectjava.io.IOException
public static java.nio.ByteBuffer convertImageData(java.awt.image.BufferedImage bi)
BufferedImage
to ByteBuffer
.bi
- Input imagepublic static java.util.List<javax.imageio.IIOImage> getIIOImageList(java.io.File imageFile) throws java.io.IOException
IIOImage
objects for an image file.imageFile
- input image file. It can be any of the supported
formats, including TIFF, JPEG, GIF, PNG, BMP, JPEG, and PDF if GPL
Ghostscript is installedIIOImage
objectsjava.io.IOException
public static java.util.List<javax.imageio.IIOImage> getIIOImageList(java.awt.image.BufferedImage bi) throws java.io.IOException
IIOImage
objects for a
BufferedImage
.bi
- input imageIIOImage
objectsjava.io.IOException
public static void mergeTiff(java.io.File[] inputImages, java.io.File outputTiff) throws java.io.IOException
inputImages
- an array of image filesoutputTiff
- the output TIFF filejava.io.IOException
public static java.util.Map<java.lang.String,java.lang.String> readImageData(javax.imageio.IIOImage oimage)
oimage
-