MacGapProject/MacGap1 — pull request #138 by hfcorriez (2014-11-03 09:04:23+00:00)
Title: Add pasteImage API to handle paste image

The API will return BASE64 string format of Image. You can add "data:image/png;base64," prefix and set to src attribute, it will be shown as html5 data uri image.

If you want to mock a html5 File Object to upload or do some other things. There is the code:

```javascript
var imgData = window.macgap.clipboard.pasteImage();
if (!imgData) return;
var byteString = window.atob(imgData);
var ia = new Uint8Array(byteString.length);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
var file = new Blob([ia], {type: 'image/png', encoding: 'utf-8'});
```