var bitmapData = selection.items[0].getBitmapData();
clipboard.copyBitmapData(bitmapData);
Use Case
Greg is a member of the graphic design community DDDrool. He wants to be able to copy parts of his designs to share with his community but he wants to add his watermark to it.
So he writes a plugin that adds his water mark, and then copies the design to the clipboard as bitmap data. He then logs into the community site and pastes the image to web submission form.
Copy a base 64 image data string to the clipboard? That might work sometimes. There are numerous forms on the web that accept bitmap data pasted from the clipboard.
For example, gmail, imgur, discourse and more accept bitmap data from the clipboard.
FYI Chromium added support for this yesterday,
“Final CL for shipping new Async Clipboard API w/image support! :D”