Is there a way to set GIF RLE compress when calling Canvas.toDataUrl()?
I'm working on a minimalist image creation project and I need to have the ability to create images within the browser that are uploaded and used on a server.
I've managed to create the image data for the server via calling the toDataUrl() method on my canvas object. Specifically, I create m开发者_运维知识库y image by calling toDataUrl('image/gif') but the resulting image is not RLE compressed. Is there a way that I can force the toDataUrl method to create a compressed GIF?
The spec leaves it up to the browser on how to implement the GIF mime type. The only guaranteed MIME in the spec is image/png
So unfortunately, even if you're lucky enough that the browser will generate GIF, there doesn't seem to be any browsers currently that take RLE into consideration.
精彩评论