-2

I am developing a java swing based application which show thumbnail of any format(jpg,png) images. For that, at first I read the image file by ImageIO.read(file name) and then create thumbnail of it. But it shows null pointer exception when read PSD format file.

I use ideli library for read PSD type file but it requires subcription/paid. So there have any free library to read PSD type file in Java?

image = ImageIO.read(new File(i));
thumb = Thumbnails.of(image).size(140,100).outputFormat("png").asBufferedImage();
ImageIO.write(thumb, "png", new File("thumb.png"));

By above code, I can read (without PSD) image file and create thumbnail of image.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Tanzil
  • 15
  • 1
  • 5

1 Answers1

1

Have a read of the documentation, PSD is not a supported format.

You might find some value from a similar question here.

Jeff Foster
  • 43,770
  • 11
  • 86
  • 103