commonsmachinery/blockhash-js

Implement support for GIF

Opened this issue · 1 comments

It would be useful to be able to support GIF. This is some JS code for a GIF decoder that may be useful in this: https://github.com/deanm/omggif

This, as other issues, can be resolved simply by using in browser decoding tool, i.e. canvas. The getImageData() API is almost the same as the libraries used in this one and it supports any type of image that the browser understands (like .gif, .webp, .bmp).

In fact I'm just using blockhashData instead of blockhash as I'm getting images via drag and drop and decoding with canvas ( not via XHR ). I don't know if there is a good server side alternative like canvas is, but as seems this library is focused on browsers ( as server side doesn't support XMLHttpRequest ) that is a good improvement using canvas.