Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Image Transfer Type

Hi all,

I am looking for a way to copy images (essentially for png) to the system clipboard in order to be able to paste it in an other app. i found an old post about this :

Currently there is no Image transfer type defined by SWT.  A platform
specific, image type specific implementation is required to interact
with other applications such as Word (e.g. Win32 BMP versus Win32 GIF
versus GTK BMP).

You can subclass the SWT Transfer class and provide this cross
platform support yourself - I am not sure if anyone already has done
some of this work and is willing to share it.


Is there any new thing (can't find anything .. so i suppose the answer is no but may be .... ) concerning this functionality ?

I just found an ImageTransfer (to transfer ImageData) class extenting ByteArrayTransfer, but all that class does is to create a byte array from the ImageData using ImageLoader. Of course this doesn't work when i try to paste my image in word for example but MUST (i didn't test it) work to transfer ImageData between 2 SWT apps ....

Implement such a functionality means implement : PngImageTransfer.java for all SWT supported plateform using native call coming from OS.java, am i right ? To succeed in such implementation, on windows in a first time for example, i also need to read Win32 PNG clipboard specific format in order to correctly provide the image to the native clipboard (implementation of javaToNative(ImageData ) ) ??



Back to the top