globocom/thumbor — pull request #77 by dhardy92 (2012-02-24 16:58:32+00:00)
Title: add format detection by magic number

Hello,

This is a small patch to allow automatic detection of image format directly from its content base on magic number ( cf : https://en.wikipedia.org/wiki/Magic_number_%28programming%29#Examples )

This allow fake '.jpg' that are PNG in reality (some people still believe that "mv foo.jpg bar.png" change also its format...).
There is also some URL that does not present image extensions.

There is no vows test for the moment on engines and still need help (i.e. template) on that purpose.

Cheers

--
Damien