Added support for loading jpeg images.

Signed-off-by: Johan Fredriksson <johanfredriksson1987@gmail.com>