3

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.

  1. Html2canvas won't save any swf object of the page.
  2. implementation of html2canvas is not document enough to understand how to use tat.
  3. customization on html2canvas is not easy (might be only for me its not easy).
  4. i want to save capture image after highlight / black out in my local drive or my web server

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 :)

Ankit
  • 502
  • 1
  • 4
  • 20

2 Answers2

3

try http://html2canvas.hertzen.com/ it will be useful for you i think .

Mansoor Jafar
  • 1,458
  • 3
  • 15
  • 31
  • i try html2canvas... read my question again... i want to save image in my local. also html2canvas is unable to show swf in screenshot. – Ankit Sep 04 '12 at 10:52
  • ok , but i think it can do, you need more research .Anyway's see the following thread i think it will surely help you [thread](http://stackoverflow.com/q/60455/1564818) – Mansoor Jafar Sep 04 '12 at 11:01
1

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

Jojo
  • 2,720
  • 1
  • 17
  • 24
  • I guess you have not read my question fully. I want to implement tat on a button click and want to save in my local. – Ankit Sep 04 '12 at 10:51
  • I did read your question...fully. Look at the edited answer – Jojo Sep 04 '12 at 12:01
  • jojo: sir it will create one image in my local but it won't have anything inside. also the size of the image is 96x71 px only. i don't want thumbnail i want complete screen shot of the web page. – Ankit Sep 04 '12 at 12:21
  • You didnt specifiy any wishes regarding the size of the screenshots in your question, actually. anyway, there are loads of other services as answers to this question here show you. there are other questions on stackoverflow as well: http://stackoverflow.com/questions/1342611/is-there-a-webservice-api-to-grab-a-screenshot-of-another-website. One of might be working for you, just replace the ulr in my snippet above with http://do.convertapi.com/web2image?curl=http://www.google.com. I gave you some research hints for the image-creation, so please adjust the saved image by yourself. – Jojo Sep 04 '12 at 12:56