I would like to use createElement(“img’) to create .jpeg extension instead of .png
For jpeg image type, the second argument should be a number between 0
and 1 specifying the image quality level.
I am not sure what the syntax for the code would be.
Is it something like this?
createElement("img",1)
The book is talking about html5’s canvas tag and specifically its .toDataURL method.
I think you want to do something like:
In this case, it’s up to the web server to deliver the image and its type information to the web browser.