vcl/source/filter/graphicfilter.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 659df165c8c94c453d9ac7bcd34d51bdf9bb6a56
Author:     Andras Timar <[email protected]>
AuthorDate: Wed Oct 1 10:22:22 2025 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Oct 1 15:18:29 2025 +0200

    tdf#168634 Exif::processJpeg unhelpfully changes the endianness of the 
stream
    
    Change-Id: Iee40e140ad73c616bcface9e3338b8e9555e2831
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191710
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 4b0b63388594..9adf236810c7 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -965,6 +965,7 @@ ErrCode GraphicFilter::readJPEG(SvStream & rStream, Graphic 
& rGraphic, GfxLinkT
 
     // Get Orientation from EXIF data
     GraphicNativeMetadata aMetadata;
+    SvStreamEndian aOriginalEndianness(rStream.GetEndian());
     if (aMetadata.read(rStream))
     {
         Degree10 aRotation = aMetadata.getRotation();
@@ -974,6 +975,7 @@ ErrCode GraphicFilter::readJPEG(SvStream & rStream, Graphic 
& rGraphic, GfxLinkT
             aTransform.rotate(aRotation);
         }
     }
+    rStream.SetEndian(aOriginalEndianness);
 
     return aReturnCode;
 }

Reply via email to