Images losing their transparency while transfer with Clipboard [message #559605] |
Fri, 17 September 2010 10:53 |
|
Hi,
If I load images from an url or file, I can set the image to Buttons and
so on. At this point the image will shown with the correct transparency.
After copying the image data from this image into the clipboard and back
to another image, it loses their transparency.
It lose it by copies to office documents, too.
The transparency area now black or white.
ImageDescriptor descriptor= ImageDescriptor.createFromURL(url);
button.setImage(descriptor.createImage(true);
Clipboard clipboard = new Clipboard(display);
clipboard.setContents(new Object[]{button.getImage().getImageData()},
new Transfer[]{ImageTransfer.getInstance()});
ImageData
copiedData=(ImageData)clipboard.getContents(ImageTransfer.ge tInstance());
button2.setImage(new Image(display, copiedData));
It is a bug or do I have to do something more with the imageData for
transfer?
Thanks in advance
Heiko
|
|
|
|
Powered by
FUDForum. Page generated in 0.01883 seconds