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 10:53 Go to next message
Heiko is currently offline HeikoFriend
Messages: 43
Registered: July 2009
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);

Clipboard clipboard = new Clipboard(display);
clipboard.setContents(new Object[]{button.getImage().getImageData()},
new Transfer[]{ImageTransfer.getInstance()});

copiedData=(ImageData)clipboard.getContents( tInstance());

button2.setImage(new Image(display, copiedData));

It is a bug or do I have to do something more with the imageData for

Thanks in advance

Re: Images losing their transparency while transfer with Clipboard [message #559621 is a reply to message #559605] Fri, 17 September 2010 12:12 Go to previous message
Lakshmi ShanmugamFriend
Messages: 275
Registered: July 2009
Location: India
Senior Member

I think you are seeing bug

Lakshmi P Shanmugam

[Updated on: Fri, 17 September 2010 12: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: Wed Dec 02 03:46:40 GMT 2015

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

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