Class PsdDecoder


  • public class PsdDecoder
    extends com.idrsolutions.image.JDeliImage
    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);
     
    • Constructor Detail

      • PsdDecoder

        public PsdDecoder()
        Constructor generates instance from byte data
    • Method Detail

      • read

        public BufferedImage read​(byte[] psdRawData)
                           throws Exception
        Decodes and returns the Photoshop image as a BufferedImage from bytes
        Parameters:
        psdRawData - byte[] containing the PNG data to be decoded
        Returns:
        BufferedImage The decoded image
        Throws:
        IOException
        Exception
      • read

        public BufferedImage read​(File file)
                           throws Exception
        Decodes and returns the Photoshop image as a BufferedImage from a file
        Parameters:
        file - input image file to be decoded
        Returns:
        BufferedImage decoded image
        Throws:
        IOException
        Exception