Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
Heiko is currently offline Heiko
Messages: 43
Registered: July 2009
Member
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
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,

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


Lakshmi P Shanmugam

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

Report message to a moderator

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


Current Time: Tue Sep 02 00:21:23 EDT 2014

Powered by FUDForum. Page generated in 0.01919 seconds