public class PNMImageParser extends ImageParser implements PNMConstants
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_KEY_PNM_RAWBITS |
static String |
PARAM_VALUE_PNM_RAWBITS_NO |
static String |
PARAM_VALUE_PNM_RAWBITS_YES |
debug
PBM_RAW_CODE, PBM_TEXT_CODE, PGM_RAW_CODE, PGM_TEXT_CODE, PNM_PREFIX_BYTE, PNM_SEPARATOR, PPM_RAW_CODE, PPM_TEXT_CODE
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
BYTE_ORDER_BIG_ENDIAN, BYTE_ORDER_INTEL, BYTE_ORDER_LEAST_SIGNIFICANT_BYTE, BYTE_ORDER_LITTLE_ENDIAN, BYTE_ORDER_LSB, BYTE_ORDER_MOST_SIGNIFICANT_BYTE, BYTE_ORDER_MOTOROLA, BYTE_ORDER_MSB, BYTE_ORDER_NETWORK
Constructor and Description |
---|
PNMImageParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
dumpImageFile(PrintWriter pw,
ByteSource byteSource) |
byte[] |
embedICCProfile(byte[] image,
byte[] profile) |
boolean |
embedICCProfile(File src,
File dst,
byte[] profile) |
protected String[] |
getAcceptedExtensions() |
protected ImageFormat[] |
getAcceptedTypes() |
BufferedImage |
getBufferedImage(ByteSource byteSource,
Map params) |
String |
getDefaultExtension() |
byte[] |
getICCProfileBytes(ByteSource byteSource,
Map params) |
ImageInfo |
getImageInfo(ByteSource byteSource,
Map params) |
Dimension |
getImageSize(ByteSource byteSource,
Map params) |
IImageMetadata |
getMetadata(ByteSource byteSource,
Map params) |
String |
getName() |
String |
getXmpXml(ByteSource byteSource,
Map params)
Extracts embedded XML metadata as XML string.
|
void |
writeImage(BufferedImage src,
OutputStream os,
Map params) |
canAcceptExtension, canAcceptExtension, canAcceptType, dumpImageFile, dumpImageFile, dumpImageFile, getAllBufferedImages, getAllBufferedImages, getAllBufferedImages, getAllImageParsers, getBufferedImage, getBufferedImage, getBufferedImageFactory, getFormatCompliance, getFormatCompliance, getFormatCompliance, getICCProfileBytes, getICCProfileBytes, getICCProfileBytes, getICCProfileBytes, getImageInfo, getImageInfo, getImageInfo, getImageSize, getImageSize, getImageSize, getImageSize, getMetadata, getMetadata, getMetadata, getMetadata, getMetadata, isStrict
byteArrayHasPrefix, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToShort, convertByteArrayToShort, getByteOrder, int2ToByteArray, read2Bytes, read3Bytes, read4Bytes, setByteOrder, setByteOrder
CharsToQuad, compareByteArrays, compareByteArrays, compareBytes, compareBytes, convertByteArrayToDouble, convertByteArrayToDouble, convertByteArrayToDoubleArray, convertByteArrayToFloat, convertByteArrayToFloat, convertByteArrayToFloatArray, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToIntArray, convertByteArrayToRational, convertByteArrayToRational, convertByteArrayToRationalArray, convertByteArrayToShort, convertByteArrayToShort, convertByteArrayToShortArray, convertDoubleArrayToByteArray, convertDoubleToByteArray, convertFloatArrayToByteArray, convertFloatToByteArray, convertIntArrayToByteArray, convertIntArrayToRationalArray, convertRationalArrayToByteArray, convertRationalToByteArray, convertShortArrayToByteArray, convertShortToByteArray, copyStreamToStream, debugByteArray, debugNumber, debugNumber, debugNumber, debugNumber, debugNumberArray, findNull, findNull, getBytearrayHead, getByteArrayTail, getDebug, getRAFBytes, getStreamBytes, head, int2ToByteArray, printByteBits, printCharQuad, printCharQuad, read2Bytes, read3Bytes, read4Bytes, readAndVerifyBytes, readAndVerifyBytes, readByte, readBytearray, readByteArray, readByteArray, readBytes, readRandomBytes, scanForByte, setDebug, skipBytes, skipBytes, slice, startsWith, tail, writeIntInToByteArray
public static final String PARAM_KEY_PNM_RAWBITS
public static final String PARAM_VALUE_PNM_RAWBITS_YES
public static final String PARAM_VALUE_PNM_RAWBITS_NO
public String getName()
getName
in class ImageParser
public String getDefaultExtension()
getDefaultExtension
in class ImageParser
protected String[] getAcceptedExtensions()
getAcceptedExtensions
in class ImageParser
protected ImageFormat[] getAcceptedTypes()
getAcceptedTypes
in class ImageParser
public byte[] getICCProfileBytes(ByteSource byteSource, Map params) throws ImageReadException, IOException
getICCProfileBytes
in class ImageParser
ImageReadException
IOException
public Dimension getImageSize(ByteSource byteSource, Map params) throws ImageReadException, IOException
getImageSize
in class ImageParser
ImageReadException
IOException
public byte[] embedICCProfile(byte[] image, byte[] profile)
public boolean embedICCProfile(File src, File dst, byte[] profile)
embedICCProfile
in class ImageParser
public IImageMetadata getMetadata(ByteSource byteSource, Map params) throws ImageReadException, IOException
getMetadata
in class ImageParser
ImageReadException
IOException
public ImageInfo getImageInfo(ByteSource byteSource, Map params) throws ImageReadException, IOException
getImageInfo
in class ImageParser
ImageReadException
IOException
public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource) throws ImageReadException, IOException
dumpImageFile
in class ImageParser
ImageReadException
IOException
public BufferedImage getBufferedImage(ByteSource byteSource, Map params) throws ImageReadException, IOException
getBufferedImage
in class ImageParser
ImageReadException
IOException
public void writeImage(BufferedImage src, OutputStream os, Map params) throws ImageWriteException, IOException
writeImage
in class ImageParser
ImageWriteException
IOException
public String getXmpXml(ByteSource byteSource, Map params) throws ImageReadException, IOException
getXmpXml
in class ImageParser
file
- File containing image data.params
- Map of optional parameters, defined in SanselanConstants.ImageReadException
IOException
Copyright © 2007-2012. All Rights Reserved.