digiPlant/play-scalr — pull request #4 by mguillermin (2014-02-14 09:00:32+00:00)
Title: Improved image format detection

The format detection based on `BufferedImage.TYPE_INT_RGB` doesn't seem to work correctly.

I have a bunch of JPEG files that has been recognized as PNG, leading to very large image files (PNG for "photos" is not an appropriate format).

I modified the code to do the detection based on the first two bytes of the original file. The code is looking for the JPEG "first bytes" signature (found here: http://www.garykessler.net/library/file_sigs.html).