|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sanselan.Sanselan
public abstract class Sanselan
The primary interface to the sanselan library.
Almost all of the Sanselan library's core functionality can be accessed through it's methods.
All of Sanselan's methods are static.
See the source of the SampleUsage class and other classes in the org.apache.sanselan.sampleUsage package for examples.
org.apache.sanselan.sampleUsage.SampleUsage
Field Summary |
---|
Fields inherited from interface org.apache.sanselan.SanselanConstants |
---|
BUFFERED_IMAGE_FACTORY, PARAM_KEY_COMPRESSION, PARAM_KEY_FILENAME, PARAM_KEY_FORMAT, PARAM_KEY_READ_THUMBNAILS, PARAM_KEY_STRICT, PARAM_KEY_VERBOSE, PARAM_KEY_XMP_XML |
Constructor Summary | |
---|---|
Sanselan()
|
Method Summary | |
---|---|
static java.lang.String |
dumpImageFile(byte[] bytes)
Returns a description of the image's structure. |
static java.lang.String |
dumpImageFile(java.io.File file)
Returns a description of the image file's structure. |
static java.util.ArrayList |
getAllBufferedImages(byte[] bytes)
Returns all images contained in an image. |
static java.util.ArrayList |
getAllBufferedImages(java.io.File file)
Returns all images contained in an image file. |
static java.util.ArrayList |
getAllBufferedImages(java.io.InputStream is,
java.lang.String filename)
Returns all images contained in an image. |
static java.awt.image.BufferedImage |
getBufferedImage(byte[] bytes)
Reads the first image from an image file as a BufferedImage. |
static java.awt.image.BufferedImage |
getBufferedImage(byte[] bytes,
java.util.Map params)
Reads the first image from an image file as a BufferedImage. |
static java.awt.image.BufferedImage |
getBufferedImage(java.io.File file)
Reads the first image from an image file as a BufferedImage. |
static java.awt.image.BufferedImage |
getBufferedImage(java.io.File file,
java.util.Map params)
Reads the first image from an image file as a BufferedImage. |
static java.awt.image.BufferedImage |
getBufferedImage(java.io.InputStream is)
Reads the first image from an InputStream as a BufferedImage. |
static java.awt.image.BufferedImage |
getBufferedImage(java.io.InputStream is,
java.util.Map params)
Reads the first image from an InputStream as a BufferedImage. |
static FormatCompliance |
getFormatCompliance(byte[] bytes)
|
static FormatCompliance |
getFormatCompliance(java.io.File file)
|
static java.awt.color.ICC_Profile |
getICCProfile(byte[] bytes)
Extracts an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static java.awt.color.ICC_Profile |
getICCProfile(byte[] bytes,
java.util.Map params)
Extracts an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
protected static java.awt.color.ICC_Profile |
getICCProfile(ByteSource byteSource,
java.util.Map params)
|
static java.awt.color.ICC_Profile |
getICCProfile(java.io.File file)
Extracts an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static java.awt.color.ICC_Profile |
getICCProfile(java.io.File file,
java.util.Map params)
Extracts an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static java.awt.color.ICC_Profile |
getICCProfile(java.io.InputStream is,
java.lang.String filename)
Extracts an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static java.awt.color.ICC_Profile |
getICCProfile(java.io.InputStream is,
java.lang.String filename,
java.util.Map params)
Extracts an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static byte[] |
getICCProfileBytes(byte[] bytes)
Extracts the raw bytes of an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static byte[] |
getICCProfileBytes(byte[] bytes,
java.util.Map params)
Extracts the raw bytes of an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static byte[] |
getICCProfileBytes(java.io.File file)
Extracts the raw bytes of an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static byte[] |
getICCProfileBytes(java.io.File file,
java.util.Map params)
Extracts the raw bytes of an ICC Profile (if present) from JPEG, PNG, PSD (Photoshop) and TIFF images. |
static ImageInfo |
getImageInfo(byte[] bytes)
Parses the "image info" of an image. |
static ImageInfo |
getImageInfo(byte[] bytes,
java.util.Map params)
Parses the "image info" of an image. |
static ImageInfo |
getImageInfo(java.io.File file)
Parses the "image info" of an image file. |
static ImageInfo |
getImageInfo(java.io.File file,
java.util.Map params)
Parses the "image info" of an image file. |
static ImageInfo |
getImageInfo(java.io.InputStream is,
java.lang.String filename)
Parses the "image info" of an image. |
static ImageInfo |
getImageInfo(java.io.InputStream is,
java.lang.String filename,
java.util.Map params)
Parses the "image info" of an image. |
static ImageInfo |
getImageInfo(java.lang.String filename,
byte[] bytes)
Parses the "image info" of an image. |
static ImageInfo |
getImageInfo(java.lang.String filename,
byte[] bytes,
java.util.Map params)
Parses the "image info" of an image. |
static java.awt.Dimension |
getImageSize(byte[] bytes)
Determines the width and height of an image. |
static java.awt.Dimension |
getImageSize(byte[] bytes,
java.util.Map params)
Determines the width and height of an image. |
static java.awt.Dimension |
getImageSize(ByteSource byteSource,
java.util.Map params)
|
static java.awt.Dimension |
getImageSize(java.io.File file)
Determines the width and height of an image file. |
static java.awt.Dimension |
getImageSize(java.io.File file,
java.util.Map params)
Determines the width and height of an image file. |
static java.awt.Dimension |
getImageSize(java.io.InputStream is,
java.lang.String filename)
Determines the width and height of an image. |
static java.awt.Dimension |
getImageSize(java.io.InputStream is,
java.lang.String filename,
java.util.Map params)
Determines the width and height of an image. |
static IImageMetadata |
getMetadata(byte[] bytes)
Parses the metadata of an image. |
static IImageMetadata |
getMetadata(byte[] bytes,
java.util.Map params)
Parses the metadata of an image. |
static IImageMetadata |
getMetadata(java.io.File file)
Parses the metadata of an image file. |
static IImageMetadata |
getMetadata(java.io.File file,
java.util.Map params)
Parses the metadata of an image file. |
static IImageMetadata |
getMetadata(java.io.InputStream is,
java.lang.String filename)
Parses the metadata of an image file. |
static IImageMetadata |
getMetadata(java.io.InputStream is,
java.lang.String filename,
java.util.Map params)
Parses the metadata of an image file. |
static java.lang.String |
getXmpXml(byte[] bytes)
Determines the width and height of an image. |
static java.lang.String |
getXmpXml(byte[] bytes,
java.util.Map params)
Determines the width and height of an image. |
static java.lang.String |
getXmpXml(ByteSource byteSource,
java.util.Map params)
Extracts embedded XML metadata as XML string. |
static java.lang.String |
getXmpXml(java.io.File file)
Extracts embedded XML metadata as XML string. |
static java.lang.String |
getXmpXml(java.io.File file,
java.util.Map params)
Extracts embedded XML metadata as XML string. |
static java.lang.String |
getXmpXml(java.io.InputStream is,
java.lang.String filename)
Determines the width and height of an image. |
static java.lang.String |
getXmpXml(java.io.InputStream is,
java.lang.String filename,
java.util.Map params)
Determines the width and height of an image. |
static ImageFormat |
guessFormat(byte[] bytes)
Tries to guess what the image type (if any) of data based on the file's "magic numbers," the first bytes of the data. |
static ImageFormat |
guessFormat(ByteSource byteSource)
|
static ImageFormat |
guessFormat(java.io.File file)
Tries to guess what the image type (if any) of a file based on the file's "magic numbers," the first bytes of the file. |
static boolean |
hasImageFileExtension(java.io.File file)
Tries to guess whether a file contains an image based on its file extension. |
static boolean |
hasImageFileExtension(java.lang.String filename)
Tries to guess whether a filename represents an image based on its file extension. |
static void |
writeImage(java.awt.image.BufferedImage src,
java.io.File file,
ImageFormat format,
java.util.Map params)
Writes a BufferedImage to a file. |
static void |
writeImage(java.awt.image.BufferedImage src,
java.io.OutputStream os,
ImageFormat format,
java.util.Map params)
Writes a BufferedImage to an OutputStream. |
static byte[] |
writeImageToBytes(java.awt.image.BufferedImage src,
ImageFormat format,
java.util.Map params)
Writes a BufferedImage to a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sanselan()
Method Detail |
---|
public static boolean hasImageFileExtension(java.io.File file)
Returns true if the file has a file extension associated with a file format, such as .jpg or .gif.
file
- File which may contain an image.
public static boolean hasImageFileExtension(java.lang.String filename)
Returns true if the filename has a file extension associated with a file format, such as .jpg or .gif.
filename
- String representing name of file which may contain an image.
public static ImageFormat guessFormat(byte[] bytes) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
public static ImageFormat guessFormat(java.io.File file) throws ImageReadException, java.io.IOException
file
- File containing image data.
ImageReadException
java.io.IOException
public static ImageFormat guessFormat(ByteSource byteSource) throws ImageReadException, java.io.IOException
ImageReadException
java.io.IOException
public static java.awt.color.ICC_Profile getICCProfile(byte[] bytes) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
public static java.awt.color.ICC_Profile getICCProfile(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.awt.color.ICC_Profile getICCProfile(java.io.InputStream is, java.lang.String filename) throws ImageReadException, java.io.IOException
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).
ImageReadException
java.io.IOException
public static java.awt.color.ICC_Profile getICCProfile(java.io.InputStream is, java.lang.String filename, java.util.Map params) throws ImageReadException, java.io.IOException
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.awt.color.ICC_Profile getICCProfile(java.io.File file) throws ImageReadException, java.io.IOException
file
- File containing image data.
ImageReadException
java.io.IOException
public static java.awt.color.ICC_Profile getICCProfile(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
protected static java.awt.color.ICC_Profile getICCProfile(ByteSource byteSource, java.util.Map params) throws ImageReadException, java.io.IOException
ImageReadException
java.io.IOException
public static byte[] getICCProfileBytes(byte[] bytes) throws ImageReadException, java.io.IOException
To parse the result use IccProfileParser or ICC_Profile.getInstance(bytes).
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
IccProfileParser
,
ICC_Profile
public static byte[] getICCProfileBytes(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
To parse the result use IccProfileParser or ICC_Profile.getInstance(bytes).
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
IccProfileParser
,
ICC_Profile
public static byte[] getICCProfileBytes(java.io.File file) throws ImageReadException, java.io.IOException
To parse the result use IccProfileParser or ICC_Profile.getInstance(bytes).
file
- File containing image data.
ImageReadException
java.io.IOException
IccProfileParser
,
ICC_Profile
public static byte[] getICCProfileBytes(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
To parse the result use IccProfileParser or ICC_Profile.getInstance(bytes).
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
IccProfileParser
,
ICC_Profile
public static ImageInfo getImageInfo(java.lang.String filename, byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
filename
- String.bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(java.lang.String filename, byte[] bytes) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
filename
- String.bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(java.io.InputStream is, java.lang.String filename) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(java.io.InputStream is, java.lang.String filename, java.util.Map params) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(byte[] bytes) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
ImageInfo
public static ImageInfo getImageInfo(java.io.File file) throws ImageReadException, java.io.IOException
"Image info" is a summary of basic information about the image such as: width, height, file format, bit depth, color type, etc.
Not to be confused with "image metadata."
file
- File containing image data.
ImageReadException
java.io.IOException
ImageInfo
public static java.awt.Dimension getImageSize(java.io.InputStream is, java.lang.String filename) throws ImageReadException, java.io.IOException
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).
ImageReadException
java.io.IOException
public static java.awt.Dimension getImageSize(java.io.InputStream is, java.lang.String filename, java.util.Map params) throws ImageReadException, java.io.IOException
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.awt.Dimension getImageSize(byte[] bytes) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
public static java.awt.Dimension getImageSize(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.awt.Dimension getImageSize(java.io.File file) throws ImageReadException, java.io.IOException
file
- File containing image data.
ImageReadException
java.io.IOException
public static java.awt.Dimension getImageSize(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.awt.Dimension getImageSize(ByteSource byteSource, java.util.Map params) throws ImageReadException, java.io.IOException
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(java.io.InputStream is, java.lang.String filename) throws ImageReadException, java.io.IOException
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(java.io.InputStream is, java.lang.String filename, java.util.Map params) throws ImageReadException, java.io.IOException
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(byte[] bytes) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(java.io.File file) throws ImageReadException, java.io.IOException
file
- File containing image data.
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static java.lang.String getXmpXml(ByteSource byteSource, java.util.Map params) throws ImageReadException, java.io.IOException
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
public static IImageMetadata getMetadata(byte[] bytes) throws ImageReadException, java.io.IOException
JPEG/JFIF files may contain EXIF and/or IPTC metadata. PNG files may contain comments. TIFF files may contain metadata.
The instance of IImageMetadata returned by getMetadata() should be upcast (depending on image format).
Not to be confused with "image info."
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
IImageMetadata
public static IImageMetadata getMetadata(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
JPEG/JFIF files may contain EXIF and/or IPTC metadata. PNG files may contain comments. TIFF files may contain metadata.
The instance of IImageMetadata returned by getMetadata() should be upcast (depending on image format).
Not to be confused with "image info."
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
IImageMetadata
public static IImageMetadata getMetadata(java.io.InputStream is, java.lang.String filename) throws ImageReadException, java.io.IOException
JPEG/JFIF files may contain EXIF and/or IPTC metadata. PNG files may contain comments. TIFF files may contain metadata.
The instance of IImageMetadata returned by getMetadata() should be upcast (depending on image format).
Not to be confused with "image info."
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).
ImageReadException
java.io.IOException
IImageMetadata
public static IImageMetadata getMetadata(java.io.InputStream is, java.lang.String filename, java.util.Map params) throws ImageReadException, java.io.IOException
JPEG/JFIF files may contain EXIF and/or IPTC metadata. PNG files may contain comments. TIFF files may contain metadata.
The instance of IImageMetadata returned by getMetadata() should be upcast (depending on image format).
Not to be confused with "image info."
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
IImageMetadata
public static IImageMetadata getMetadata(java.io.File file) throws ImageReadException, java.io.IOException
JPEG/JFIF files may contain EXIF and/or IPTC metadata. PNG files may contain comments. TIFF files may contain metadata.
The instance of IImageMetadata returned by getMetadata() should be upcast (depending on image format).
Not to be confused with "image info."
file
- File containing image data.
ImageReadException
java.io.IOException
IImageMetadata
public static IImageMetadata getMetadata(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
JPEG/JFIF files may contain EXIF and/or IPTC metadata. PNG files may contain comments. TIFF files may contain metadata.
The instance of IImageMetadata returned by getMetadata() should be upcast (depending on image format).
Not to be confused with "image info."
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
IImageMetadata
public static java.lang.String dumpImageFile(byte[] bytes) throws ImageReadException, java.io.IOException
Useful for exploring format-specific details of image files.
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
public static java.lang.String dumpImageFile(java.io.File file) throws ImageReadException, java.io.IOException
Useful for exploring format-specific details of image files.
file
- File containing image data.
ImageReadException
java.io.IOException
public static FormatCompliance getFormatCompliance(byte[] bytes) throws ImageReadException, java.io.IOException
ImageReadException
java.io.IOException
public static FormatCompliance getFormatCompliance(java.io.File file) throws ImageReadException, java.io.IOException
ImageReadException
java.io.IOException
public static java.util.ArrayList getAllBufferedImages(java.io.InputStream is, java.lang.String filename) throws ImageReadException, java.io.IOException
Useful for image formats such as GIF and ICO in which a single file may contain multiple images.
is
- InputStream from which to read image data.filename
- Filename associated with image data (optional).
ImageReadException
java.io.IOException
public static java.util.ArrayList getAllBufferedImages(byte[] bytes) throws ImageReadException, java.io.IOException
Useful for image formats such as GIF and ICO in which a single file may contain multiple images.
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
public static java.util.ArrayList getAllBufferedImages(java.io.File file) throws ImageReadException, java.io.IOException
Useful for image formats such as GIF and ICO in which a single file may contain multiple images.
file
- File containing image data.
ImageReadException
java.io.IOException
public static java.awt.image.BufferedImage getBufferedImage(java.io.InputStream is) throws ImageReadException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
is
- InputStream to read image data from.
ImageReadException
java.io.IOException
SanselanConstants
public static java.awt.image.BufferedImage getBufferedImage(java.io.InputStream is, java.util.Map params) throws ImageReadException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
is
- InputStream to read image data from.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
SanselanConstants
public static java.awt.image.BufferedImage getBufferedImage(byte[] bytes) throws ImageReadException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
bytes
- Byte array containing an image file.
ImageReadException
java.io.IOException
SanselanConstants
public static java.awt.image.BufferedImage getBufferedImage(byte[] bytes, java.util.Map params) throws ImageReadException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
bytes
- Byte array containing an image file.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
SanselanConstants
public static java.awt.image.BufferedImage getBufferedImage(java.io.File file) throws ImageReadException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
file
- File containing image data.
ImageReadException
java.io.IOException
SanselanConstants
public static java.awt.image.BufferedImage getBufferedImage(java.io.File file, java.util.Map params) throws ImageReadException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.
ImageReadException
java.io.IOException
SanselanConstants
public static void writeImage(java.awt.image.BufferedImage src, java.io.File file, ImageFormat format, java.util.Map params) throws ImageWriteException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
src
- The BufferedImage to be written.file
- File to write to.format
- The ImageFormat to use.params
- Map of optional parameters, defined in SanselanConstants.
ImageWriteException
java.io.IOException
SanselanConstants
public static byte[] writeImageToBytes(java.awt.image.BufferedImage src, ImageFormat format, java.util.Map params) throws ImageWriteException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
src
- The BufferedImage to be written.format
- The ImageFormat to use.params
- Map of optional parameters, defined in SanselanConstants.
ImageWriteException
java.io.IOException
SanselanConstants
public static void writeImage(java.awt.image.BufferedImage src, java.io.OutputStream os, ImageFormat format, java.util.Map params) throws ImageWriteException, java.io.IOException
(TODO: elaborate here.)
Sanselan can only read image info, metadata and ICC profiles from all image formats. However, note that the library cannot currently read or write JPEG image data. PSD (Photoshop) files can only be partially read and cannot be written. All other formats (PNG, GIF, TIFF, BMP, etc.) are fully supported.
src
- The BufferedImage to be written.os
- The OutputStream to write to.format
- The ImageFormat to use.params
- Map of optional parameters, defined in SanselanConstants.
ImageWriteException
java.io.IOException
SanselanConstants
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |