Sounds simple right? Use
ImageIO.read(new ByteArrayInputStream(bytes));
Here\'s the wrinkle. For some reason it is detecting a jpeg as a b
For the reference you can have a look at wikipedia, you can find the header of the different formats there. http://en.wikipedia.org/wiki/Graphics_Interchange_Format http://en.wikipedia.org/wiki/BMP_file_format http://en.wikipedia.org/wiki/JPEG