Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Images losing their transparency while transfer with Clipboard
Images losing their transparency while transfer with Clipboard [message #559605] Fri, 17 September 2010 06:53 Go to next message
Eclipse UserFriend
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
Re: Images losing their transparency while transfer with Clipboard [message #559621 is a reply to message #559605] Fri, 17 September 2010 08:12 Go to previous message
Eclipse UserFriend
Hi,

I think you are seeing bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=305314

[Updated on: Fri, 17 September 2010 08:12] by Moderator

Previous Topic:TableColumns provide still too little event support
Next Topic:Insert Text in Editor
Goto Forum:
  


Current Time: Wed Jul 23 18:01:12 EDT 2025

Powered by FUDForum. Page generated in 0.03913 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top