Added JPEG and GIF support