Is it possible at all to create a feature on a website where you allow a user to select a portion of the web page, and that selected area is rendered as an image?
Its similar to the “Cropper” desktop program but needs to be embedded on the web page
It sounds near impossible using JS, flash, silverlight or any web based tools but I just wanted to get a 2nd opinion. Thanks
That’s not generally possible for security reasons.
For example, just talking about Firefox, see here:
https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas#Rendering_Web_Content_Into_A_Canvas
Sounds good! But:
And the notes in the “Read Why” link:
If you are truly determined to make this work and you have a VPS/dedicated server, you might be able to do this by controlling a browser server-side (using Selenium RC) that captures a screenshot of an arbitrary web page, and returns the image to the browser. The user can then “crop” from this image.
Or easier than Selenium RC: you could use wkhtmltoimage from wkhtmltopdf to generate the screenshot.
Not easy, and it might not even work for what you’re trying to do.