14 lines
570 B
Diff
14 lines
570 B
Diff
diff --git a/src/libOpenImageIO/exif.cpp b/src/libOpenImageIO/exif.cpp
|
|
index 90eaaec6e9..1fbf04140e 100644
|
|
--- a/src/libOpenImageIO/exif.cpp
|
|
+++ b/src/libOpenImageIO/exif.cpp
|
|
@@ -1302,6 +1302,8 @@ encode_exif(const ImageSpec& spec, std::vector<char>& blob,
|
|
TIFFHeader head;
|
|
head.tiff_magic = (endianreq == endian::little) ? 0x4949 : 0x4d4d;
|
|
head.tiff_version = 42;
|
|
+ if (endianreq != endian::native)
|
|
+ swap_endian(&head.tiff_version);
|
|
// N.B. need to swap_endian head.tiff_diroff below, once we know the sizes
|
|
append(blob, head);
|
|
|