Copy image to OSX clipboard

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Copy image to OSX clipboard

Maarten Mostert-2
Hi,
I am looking to a way to copy an image to the OSX clipboard.
On windows I use the below indicated method, however this doesn’t work on OSX.
Any ideas are welcome.

Regards,

@+Maarten,


createCopyPngImage

| viewBounds progressImage progressCR myNewPixmap |
viewBounds := parent avancementCairoViewWidget bounds.
progressImage := CairoGraphics.ImageSurface
format: CairoGraphics.CairoFormat argb32
extent: viewBounds width rounded @ viewBounds height rounded.
progressCR := progressImage context.
parent avancementCairoViewWidget renderOn: progressCR.
myNewPixmap := Pixmap extent: progressImage extent.
progressImage displayOn: myNewPixmap graphicsContext.
myNewPixmap toClipboard.
MyDialog warn: (UserMessage defaultString: 'Image copied to clipboard'
key: #imageCopiedInClipBoard)

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc