Right-click a webpage image in any Chrome Window and click "copy image". When the image is added to the clipboard, is it possible to obtain the image in another Chrome Window, and pass bytes to the backend script (php, java ...)? Do I want to use flash for implementation? Right-click the webpage image in any Chrome Window and click "copy image". The image is added to the clipboard.
In this case, is it possible to obtain the graph in another Chrome Window and pass bytes to the backend script (php, java ...)?
Do I want to use flash for implementation?
Reply content:
Right-click the webpage image in any Chrome Window and click "copy image". The image is added to the clipboard.
In this case, is it possible to obtain the graph in another Chrome Window and pass bytes to the backend script (php, java ...)?
Do I want to use flash for implementation?
Theoretically it seems okay?
XHR reads the image into ArrayBuffer
Then use localStorage to store
Then you can upload the image.
The last part of this article illustrates the usage
Http://www.w3ctech.com/p/1061
Good luck ~
Add a simpler example
Https://gist.github.com/robnyman/1875241
To directly access the clipboard, you may need to use Chrome extension. Otherwise, this operation is too dangerous. There are some cut-and-paste APIs in the extension, but they are not detailed about whether binary data is supported or not.
Can the landlord elaborate on the working environment of your application.
It is estimated that it is impossible. After all, Chrome attaches great importance to security. It is impossible to allow (not extended) JavaScript in a webpage to read the clipboard.
Lz can look at this html2canvas
After encoding, the content is sent to the backend and the backend generates an image.
If there is a compatibility problem, ie9 or lower is invalid