always118 / java-psd-library

Automatically exported from code.google.com/p/java-psd-library
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Eclipse Plugin #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have created a Eclipse/SWT Plugin of the java-psd-library, which I use for 
Designerator. For testing I made a little modification and added support for 
SWT by subclassing PsdLayer. What do you think of it? 

Example of calling from SWT:

FileInputStream stream;
try {
stream = new FileInputStream(file);
PsdImage psdFile = new PsdImage(stream,true);//true==swt
stream.close();
PsdLayer baseLayer = psdFile.getBaseLayer();
if (baseLayer instanceof PsdSWTLayer) {
ImageData imageData = ((PsdSWTLayer) baseLayer).getImageData();
if (imageData!=null) {
sourceImage=new Image(display, imageData);
return sourceImage;
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

You find the plugin of your project in the cvs repository of my 
project:http://code.google.com/p/designerator/

I plan on creating an extensionpoint for image readers so that the 
java-psd-library plugin can added without any ties to designerator or eclipse.

I thank you for the great job you have done. I have attached one file.

Original issue reported on code.google.com by alaska.b...@gmail.com on 1 Jun 2011 at 7:28

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot: My email address is andreas.chlache[@]designerator.de

Andreas Chlache

Original comment by alaska.b...@gmail.com on 1 Jun 2011 at 7:31