Package com.idrsolutions.image.psd
Class PsdDecoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.psd.PsdDecoder
- All Implemented Interfaces:
com.idrsolutions.image.Decoder
public class PsdDecoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Decoder
Class reads Photoshop image as BufferedImage
Example 1 (Using raw byte data):
PsdDecoder decoder = new PsdDecoder();
BufferedImage decodedImage = decoder.read(psdBytes);
Example 2 (Using File):
File psdFile = new File("C:\\path\\to\\output\\file.psd");
PsdDecoder decoder = new PsdDecoder();
BufferedImage decodedImage = decoder.read(psdFile);
-
Field Summary
Fields inherited from class com.idrsolutions.image.JDeliImage
bb -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread(byte[] psdRawData) Decodes and returns the Photoshop image as a BufferedImage from bytesDecodes and returns the Photoshop image as a BufferedImage from a filereadDimension(byte[] psdData) Decodes and returns the width and height of bmp imagereadDimension(File psdFile) Decodes and returns the width and height of bmp imageMethods inherited from class com.idrsolutions.image.JDeliImage
optimiseImageMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.idrsolutions.image.Decoder
getImageCount, getImageCount, readEmbeddedThumbnail, readEmbeddedThumbnail, readImageAt, readImageAt, readImageSpecificMetaData, readImageSpecificMetaData, setMetadata
-
Constructor Details
-
PsdDecoder
public PsdDecoder()
-
-
Method Details
-
read
Decodes and returns the Photoshop image as a BufferedImage from bytes- Specified by:
readin interfacecom.idrsolutions.image.Decoder- Parameters:
psdRawData- byte[] containing the PNG data to be decoded- Returns:
- BufferedImage The decoded image
- Throws:
IOException- if an error occurs in reading imageException
-
read
Decodes and returns the Photoshop image as a BufferedImage from a file- Specified by:
readin interfacecom.idrsolutions.image.Decoder- Parameters:
file- input image file to be decoded- Returns:
- BufferedImage decoded image
- Throws:
IOException- if an error occurs in reading imageException
-
readDimension
Decodes and returns the width and height of bmp image- Specified by:
readDimensionin interfacecom.idrsolutions.image.Decoder- Parameters:
psdFile- image image contained in raw data if present- Returns:
- width and height of image
- Throws:
IOException- if problem reading image
-
readDimension
Decodes and returns the width and height of bmp image- Specified by:
readDimensionin interfacecom.idrsolutions.image.Decoder- Parameters:
psdData- image image contained in raw data if present- Returns:
- Rectangle width and height of image
- Throws:
IOException- if problem reading image
-