Copy bitmap data to the clipboard

bitmapdata
#1

Support copying Bitmap Data to the clipboard.

Currently we have support for:

clipboard.copyText("Hello world");

Request is for:

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.

0 Likes

#2

Can’t you convert bitmap to string and the other way around?

0 Likes

#3

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”

https://bugs.chromium.org/p/chromium/issues/detail?id=150835#c104

0 Likes

#4

@Velara points taken. We will discuss this internally

0 Likes