Using JIMI to load PSD and convert to thumbnails

10-11  Source: Network gathering  Views:2 

Okay, I've tested out using JIMI to load a psd image to a JimiCanvas, but I can't seem to work out how to load the PSD file into a standard Image object (or what equivalent I need to transform it).
If I try:
JimiCanvas jc = new JimiCanvas(imageFilePath);
Image tempImage = jc.getImage();
Graphics tempg = tempImage.getGraphics();
Frame tempFrame = new Frame();
tempFrame.setVisible(true);I get the error:
java.lang.IllegalAccessError: getGraphics() only valid for images created with createImage(w, h)
     at org.ikeda.iris.photoshop.PhotoshopReader.<init>(
     at org.ikeda.iris.photoshop.PhotoshopReader.main('ve also been trying to work out how to use the PSDDecoder/Factory but I get so far:
PSDDecoderFactory psdff = new PSDDecoderFactory();
JimiDecoder jd = psdff.createDecoder();
JimiImageFactory jif = null;
java.awt.image.RenderedImage ri = null;and can't work out where to go from here.
My main task is to read in PSD images and create thumbnails.
Am I on the right track?
Are there any tutorials or docs that explain how to use it?
I've sorted this problem out by just using a JimiCanvas:
JimiCanvas jc = new JimiCanvas(imagePath);
Image tempImage = jc.getimage();
tempImage = tempImage.getScaledInstancew(width, height, Image.SCALE_SMOOTH);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
//save fileIt seems Jimi can load the psd file and do the conversion.
There is still the question of getting meta data from the image.
javax.imageio.metadata.* has some classes (it seems) to read metadata, however is this the same as the metadata a psd file may have assigned to if it's set up inside Photoshop? (adding comments, notes etc).
Related articles