Create an Image of a DIV in JavaScript (GIF/PNG)

后端 未结 7 853
萌比男神i
萌比男神i 2020-11-30 12:39

I\'m wondering is there a JavaScript library available that would allow me to generate an Image from the contents of a DIV.

Basically this is required for some Serve

7条回答
  •  悲哀的现实
    2020-11-30 13:22

    Does it have to be done on the browser side? I have seen where you can do a server side call and the MIME type on the server response is the image type. I think the example I'm thinking of was for b64 encoded jpegs in a db, but the process should be the same. The response would be the data that is currently in your DIV. Sorry if I'm way off base.

提交回复
热议问题