Add JPEG support

Also fix CRLF shenanigans.
Add GIF support