Skip to main content


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
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 12:12 Go to previous message
Lakshmi P ShanmugamFriend
Messages: 279
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 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: Fri Apr 19 07:40:27 GMT 2024

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

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

Back to the top