I would like to have a button on my website which can capture current image of my webpage. I have seen Google's "send feedback" function and want to implement tat in my web page. I also read about html2canvas and found below problems while implementing.
guys i don't bother about security issue or other things since i want to use this feature for prototype only in fact if its work in local then also its fine.
I can use local host to run this page in browser and can capture the image and save in local.
I'm also open for other solution apart from html2canvas. I just want to capture a webpage as an image if i can get highlighting and black out then it will be icing on a cake :).
Thank you :)
try http://html2canvas.hertzen.com/ it will be useful for you i think .
I just had a test with http://www.bitpixels.com/register Registration is done via google account and the service is free up to several thousands of thumbnails per month.
Just use curl:
curl --get "http://img.bitpixels.com/getthumbnail?code=SOME-CODE-YOU-GET-BY-REGISTRATION&url=http://www.example.com"
Your favorite programming-language should have support for that.
Consider this php-example:
<?php
$ch = curl_init('http://img.bitpixels.com/getthumbnail?code=SOME-CODE-YOU-GET-BY-REGISTRATION&url=http://www.example.com');
curl_setopt_array($ch, array(
CURLOPT_BINARYTRANSFER => true,
CURLOPT_RETURNTRANSFER => true
));
$imageBinary = curl_exec($ch);
file_put_contents('test.png', $imageBinary);
Please refer for further information regarding php-curl to: http://php.net/manual/de/book.curl.php
and for image-handling with php to: http://php.net/manual/en/ref.image.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With