Search code examples
metadataexifexiftool

Is there any way to convert Exif Byte Orders of a JPG file from Little-endian to Big-endian?


I have two files and I'm trying to change my second file from Little-endian to Big-endian,
You can see the following examples here:

First File:

$ exiftool FirstFile.JPG | grep "Exif Byte Order"

Exif Byte Order: Big-endian (Motorola, MM)

Second File:

exiftool SecondFile.JPG | grep "Exif Byte Order"

Exif Byte Order: Little-endian (Intel, II)

I tried exiftool to change the values but the value didn't change.

$ exiftool -ExifByteOrder="Big-endian (Motorola, MM)" SecondFile.JPG 
0 image files updated 
1 image files unchanged 

I wanna see exactly Big-endian (Motorola, MM) when I got the result from exiftool.

Any idea?


Solution

  • Though not directly stated, this is exiftool FAQ #20. Changing the byte order is covered under the "Advanced" section of that FAQ.

    You would take the command directly above the "Advanced" section and add change to the ExifByteOrder to the command

    exiftool -exif:all= -tagsfromfile @ -exif:all -unsafe -thumbnailimage -F -ExifByteOrder=Little-endian /path/to/files/