Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBrowser - Add "Copy image" item in context menu Options
Fabien
Posted: Monday, July 4, 2016 9:26:45 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2014
Posts: 130
Hi,

I try to Add an item "Copy image" (like in Chrome) in the contetual menu but I don't found how to do that.

Any help would be apprectiate.

Thanks
eo_support
Posted: Monday, July 4, 2016 3:34:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

The browser engine does not have built-in support for that. What you can do is to handle BeforeContextMenu event and then get the image Url through e.SourceUrl property. You can then download that Url directly, load the result image and then copy it to clipboard.

Thanks!
lsl
Posted: Tuesday, July 5, 2016 9:36:26 AM
Rank: Member
Groups: Member

Joined: 1/14/2016
Posts: 28
eo_support wrote:
Hi,

The browser engine does not have built-in support for that. What you can do is to handle BeforeContextMenu event and then get the image Url through e.SourceUrl property. You can then download that Url directly, load the result image and then copy it to clipboard.

Thanks!



but every time we visit the same url get different img may be..
eo_support
Posted: Tuesday, July 5, 2016 10:42:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

One way to do it is to use a canvas to copy the image:

http://stackoverflow.com/questions/934012/get-image-data-in-javascript

This way you will be able to get the image data encoded as data Url. You can then decode it to get the image data.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.