Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Can I copy an Image to clipboard?



William Gilbert,
> I would like to copy an image from a MemoryImageSource to
clipboard. How
> can I do this? The operation should run on MacOS 9.x and MacOS X,
if
> possible on other systems, too.

The MRJ drag & drop API might give you something 1.1 and 1.2, the only
reason I'm thinking that though is I believe both it and the clipboard
involve data flavors.
You might throw in the PICT decoder Patrick Beard posted once if you want
support of those.
If you wanted PICT encoding on the other end rather than Java Image that
might be trickier.
I had a somewhat incomplete little method for pasting PICT's into the
clipboard I think at some point I never expanded on. Mostly the code
involved using an offscreen GWorld to handle PICT conversion to and from
images. That part I do use and still needs OS/X porting, I think it will
still be somewhat valid. It was actually cooler when it was buggy and
instead of pasting to the clipboard would draw the images into my console
window. Still JDirect and undoubtedly less complete clipboard support than
what William indicated.
I thought there was talk a ways back about someone having included a pure
java example in some Graphics book, Geary's comes to mind?

[Hall, Michael J.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.