net.sourceforge.jiu.codecs
Class PSDCodec
A codec to read images from Photoshop PSD files.
PSD was created by Adobe for their
Photoshop
image editing software.
Note that only a small subset of valid PSD files is supported by this codec.
Typical file extension is
.psd
.
boundsAvail , boundsHeight , boundsWidth , boundsX1 , boundsX2 , boundsY1 , boundsY2 , comments , din , dout , dpiX , dpiY , image , imageIndex , in , mode , out , raf |
appendComment , checkBounds , checkImageResolution , close , getBoundsHeight , getBoundsWidth , getBoundsX1 , getBoundsX2 , getBoundsY1 , getBoundsY2 , getComment , getDataInput , getDataOutput , getDpiX , getDpiY , getFileExtensions , getFormatName , getImage , getImageIndex , getInputAsDataInput , getInputStream , getMimeTypes , getMode , getNumComments , getOutputAsDataOutput , getOutputStream , getRandomAccessFile , hasBounds , initModeFromIOObjects , isLoadingSupported , isRowRequired , isSavingSupported , isTileRequired , removeAllComments , removeBounds , setBounds , setBoundsIfNecessary , setDataInput , setDataOutput , setDpi , setFile , setFile , setImage , setImageIndex , setInputStream , setOutputStream , setRandomAccessFile , suggestFileExtension |
COLOR_MODE_GRAYSCALE
private static final int COLOR_MODE_GRAYSCALE
COLOR_MODE_INDEXED
private static final int COLOR_MODE_INDEXED
COLOR_MODE_RGB_TRUECOLOR
private static final int COLOR_MODE_RGB_TRUECOLOR
COMPRESSION_NONE
private static final short COMPRESSION_NONE
COMPRESSION_PACKBITS
private static final short COMPRESSION_PACKBITS
MAGIC_8BPS
private static final int MAGIC_8BPS
channels
private int channels
colorMode
private int colorMode
compression
private short compression
allocate
private void allocate()
getColorTypeName
private static String getColorTypeName(int colorMode)
load
private void load()
throws InvalidFileStructureException,
IOException,
UnsupportedTypeException,
WrongFileFormatException
Attempts to load an Image from argument stream in
(which
could, as an example, be a RandomAccessFile
instance, it
implements the DataInput
interface).
Checks a magic byte sequence and then reads all chunks as they appear
in the IFF file.
Will return the resulting image or null if no image body chunk was
encountered before end-of-stream.
Will throw an exception if the file is corrupt, information is missing
or there were reading errors.
loadHeader
private void loadHeader()
throws IOException,
WrongFileFormatException
Reads the PSD header to private members of this class instance.
loadPackbitsCompressedData
private void loadPackbitsCompressedData(byte[] data,
int offset,
int num)
throws InvalidFileStructureException,
IOException