Closed Thread Icon

Preserved Topic: Placing images system clipboard - Java (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21189" title="Pages that link to Preserved Topic: Placing images system clipboard - Java (Page 1 of 1)" rel="nofollow" >Preserved Topic: Placing images system clipboard - Java <span class="small">(Page 1 of 1)</span>\

 
michaell
Obsessive-Compulsive (I) Inmate

From: Halifax, NS, Canada
Insane since: Feb 2003

posted posted 02-28-2003 21:47

I'm creating a Swing application, and I need to know how to place Images on the system clipboard.

I have been able to successfully paint to a BufferedImage object, and write an image file (.png or .jpg), but I'm not sure how to place an image on the clipboard.

I've written a sub-class of image that implements Transferable, but I'm still having some problems, my questions are:

What object should getTransferData() return? An Image object? The image's Raster? pixel array? And if so, what format should the array be? (There are several types in BufferedImage).

If I store my Transferable Image as MIME type .gif of .bmp or any other standard image format, what object should getTransterData() return? a Pixel array?

In what DataFlavor should it be? I've noticed if I cut image data from MS Paint to the clipboard, java recognizes it's contents as MIME type image/x-java-image, from Class Image. But placing Image objects on the clipboard has not seemed to do me any good.

Any insight into this matter would be greatly appreciated.

Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

posted posted 03-01-2003 22:18

Well (maybe) this will help
http://developer.java.sun.com/developer/Books/GJ21AWT/ch20.pdf



Maskkkk

- Face the Present
- AIM: MASKKKK

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 03-03-2003 10:27

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu