Add JPEG support

Also fix CRLF shenanigans.