How to convert Html to image in asp.net - javascript

I want to convert my page into image, I have try html2canvas for convert HTML to image but is is not working for me because in my HTML some image load from other domain and cross domain image not load in canvas.
Thanks in advance.

I have used this one for a similar task and it works fine.

In my case i used this to convert HTML to image. You can try it out. It is available for FREE.
Hope it works...

Related

How to get plain html content with images from wikipedia API

I am trying to get html content with all images from wikipeida using wikipeida's official API. Currently, The api i use only return html content
This is what i am Using
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=google&format=json&origin=*
Thanks in advance 🙏
You can get text and images using the following query example
https://en.wikipedia.org/w/api.php?action=parse&prop=text|images&page=google&format=json&origin=*
Then for each image, you can get the url, which can be used to download the image. For example
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=imageinfo&titles=File%3ASemi-protection-shackle.svg&iiprop=url
Another example to get urls for all images on a page
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=imageinfo&rawcontinue=1&titles=google&generator=images&iiprop=url

How to Convert HTML file TO GIF

I am creating wait Cursor using CSS and google Js file.
Now I want convert That HTML file into GIF file...
Because I am using other JS file in my project so some page is conflict with google js file.
This is the link of my HTML page which I want to convert.
https://docs.google.com/file/d/0B_r9LchWcj7zMnQtdnRUaC1DUjA/edit
One way to do this is with a screen capture software. Create a video of the loader, then clip it to one cycle. Then, if you have a Mac, download the Gifrocket app, which converts the video to a gif. I had a rough go at it, and this was the result:
I was looking for something similar when I needed to convert a piece of Rich Media Ad to GIF. I used this very useful and free program called ScreenToGif. Here's the link for it:
http://www.screentogif.com
I suggest you to do the below .. Its a bit weird, but I assume that will work for you.
Do the below steps.
Download and install a screen capture software, for instance, Snagit.
Run your HTML along and enable the Video screen capture/ image sequence screen capture.
Open Photoshop, import the video/image sequence of the HTML that you have video captured which is having the wait cursor effect for which you need the GIF.
Save for web/export to the gif format.
This is how you can get what you are looking for, as HTML to GIF converter sounds impractical to achieve what you want.
Hope this helps.

Compare two images for equality (cross domain)

I'm looking for a way to check whether a specific image has been loaded on a webpage with Selenium IDE.
My first try was to generate a hash value of the image but this doesn't seem to be possible with javascript. I then found out that you can base64 encode an image if you load it into a canvas and then call toDataUrl(). However this doesn't work if the image is located on another domain.
My image server provides a standard "image not found"-image. I want to check if a specific image was successfully loaded by comparing the loaded image against the failure image. Do you have any ideas how this can be achieved?
Have you looked at 'selenium signature' as a plug in to the ide? https://addons.mozilla.org/en-US/firefox/addon/selenium-ide-signature/
It will make a crc32 signature of the element like *html=50D5FBD3*css=5BBF6784*img=81AD9F9D*
You'll only need the *img=81AD9F9D* portion to validate an image.

Saving Pixastic Images

I have been playing around with todataurl following some advice but to no avail.
I am using the pixastic processing library and the manipulated image is placed in a div. I want a way to be able to temporarily store these images so that they can be stored on the server for later use on the same page.
Any suggestions?
Here is a Demo Page
Use
document.getElementById("canvas").getContext('2d').canvas.toDataURL()
to get PNG image base64 decoded.
After it you can save image to server or in html5 localStorage.

Is this possible to embedded an image in HTML form?

Is that HTML form only support pure text only? Can I use some JS / CSS trick to let the HTML form have image embedded?
What do you mean by "image embedded"?
If it's only for decoration, you can put it before or after the form and position it with CSS as needed.
If you mean, submit an image (or any kind of file) then use input type="file".
Regarding image directly in form, it may work but I'm not sure the document will validate. Better check it out.
Use an Image tag.
http://www.w3schools.com/htmL/html_images.asp
If you mean embedded image in base64 for example, it is not possible.
You have to link a file and you cannot create a file in Javascript.
This Html Code Works Like Img But Can Show Any File Your Browser Supports.
I Tested This iframe Myself.
<iframe src="(Your Base 64 Code)"></iframe>
This Site is Not My Creation.
Use This Link To Convert Any File To Base64

Categories

Resources