Package railo.runtime.img

Examples of railo.runtime.img.PSDReader


   * @throws IOException
   */
  public final BufferedImage toBufferedImage(Resource res,String format) throws IOException {
    if(StringUtil.isEmpty(format))format=ImageUtil.getFormat(res);
    if("psd".equalsIgnoreCase(format)) {
      PSDReader reader = new PSDReader();
      InputStream is=null;
      try {
        reader.read(is=res.getInputStream());
        return reader.getImage();
      }
      finally {
        IOUtil.closeEL(is);
      }
    }
View Full Code Here


   * @throws IOException
   */
  public final BufferedImage toBufferedImage(byte[] bytes,String format) throws IOException {
    if(StringUtil.isEmpty(format))format=ImageUtil.getFormat(bytes,null);
    if("psd".equalsIgnoreCase(format)) {
      PSDReader reader = new PSDReader();
      reader.read(new ByteArrayInputStream(bytes));
      return reader.getImage();
    }
    if(JAIUtil.isSupportedReadFormat(format)){
      return JAIUtil.read(new ByteArrayInputStream(bytes),format);
    }
    BufferedImage img = ImageIO.read(new ByteArrayInputStream(bytes));
View Full Code Here

TOP

Related Classes of railo.runtime.img.PSDReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.