Kind of a follow-up to my previous question. I have written a small
JNI library that returns a byte[] containing the image data of an
icon as returned by the NSImage TIFFRepresentation method. From this
byte[] I create an (SWT) Image:
1: byte[] icon = JNIWrapper.getIcon("/usr/",size);
2: ByteArrayInputStream bais = new ByteArrayInputStream(icon);
3: ImageData imageData = new ImageData(bais);
4: return new Image(null,imageData);
If I draw the icon (in the NSImage object) with the alpha channel, my
Java app crashes with "unsupported color depth" on line 3. If I just
print the icon alone, it works, but the Icon is in a black box...
I have tried to add the alpha channel afterwards, but I get the same
error as above.
Any ideas on how to display the icon correctly?
Cheers,
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden