[vlc-devel] [PATCH] Automatically orient JPEG image based on orientation flag, if set

Jean-Baptiste Kempf jb at videolan.org
Mon Apr 18 11:52:10 CEST 2016

On 17 Apr, Wayne McDougall wrote :
> On 17 April 2016 at 17:44, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> > In what case don't we want it automatic, tbh?
> There are several convertors that will reorient your JPEG files according
> to the orientation tag
> *but do not* reset that flag to normal orientation.


> > I'm surprised we don't have the right function in vlc_common.h
> > (GetWBE/GetWLE)
> I suggest  the patch code is simpler.
> We have 4 cases: the machine may be storing data big or little endian,
> and the JPEG may be storing the EXIF headers as big or little endian.
> I really don't think the vlc_common functions help because we can't
> make any assumptions about the source byte order.
> If you think I am wrong, please let me know.

Well, I'm surprised GetWLE and GetWBE are not enough for you, and
hton16|32|64, who are actually swapping or not depending on the machine.
We have many other formats, so I'm surprised we need something new

With my kindest regards,

Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device

More information about the vlc-devel mailing list