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
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.




| 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]