From 1491b106d947a17ea8f96c83b9fefca013ce9f32 Mon Sep 17 00:00:00 2001 From: Dmitry Fedorov Date: Wed, 22 Sep 2021 11:09:17 -0700 Subject: [PATCH 1/3] fix for reading jpeg-xr images --- src/tiffimage_int.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index da740bc254..fa0a17740a 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -2032,7 +2032,9 @@ namespace Exiv2 { else { return false; } - if (tag_ != getUShort(pData + 2, byteOrder_)) return false; + //if (tag_ != getUShort(pData + 2, byteOrder_)) return false; + uint16_t t = getUShort(pData + 2, byteOrder_); + if (t != 444 && tag_ != t) return false; // dima: 444 is for the JPEG-XR offset_ = getULong(pData + 4, byteOrder_); return true; From 193eea1913fb23973e10a73ce3824428f897e7c6 Mon Sep 17 00:00:00 2001 From: Dmitry Fedorov Date: Thu, 23 Sep 2021 09:16:03 -0700 Subject: [PATCH 2/3] Update src/tiffimage_int.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com> --- src/tiffimage_int.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index fa0a17740a..94fe87f261 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -2032,7 +2032,6 @@ namespace Exiv2 { else { return false; } - //if (tag_ != getUShort(pData + 2, byteOrder_)) return false; uint16_t t = getUShort(pData + 2, byteOrder_); if (t != 444 && tag_ != t) return false; // dima: 444 is for the JPEG-XR offset_ = getULong(pData + 4, byteOrder_); From 45fe046a9c6b175705bfcf24994793afaa30c6e1 Mon Sep 17 00:00:00 2001 From: Dmitry Fedorov Date: Thu, 23 Sep 2021 09:16:11 -0700 Subject: [PATCH 3/3] Update src/tiffimage_int.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miloš Komarčević <4973094+kmilos@users.noreply.github.com> --- src/tiffimage_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index 94fe87f261..050c35d6aa 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -2033,7 +2033,7 @@ namespace Exiv2 { return false; } uint16_t t = getUShort(pData + 2, byteOrder_); - if (t != 444 && tag_ != t) return false; // dima: 444 is for the JPEG-XR + if (t != 444 && tag_ != t) return false; // 444 is for the JPEG-XR offset_ = getULong(pData + 4, byteOrder_); return true;