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

New commits:
commit bae6c3ac004111965754e71dbb0a97adc034b0d9
Author:     Andras Timar <[email protected]>
AuthorDate: Wed Oct 1 10:22:22 2025 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Oct 1 13:31:33 2025 +0200

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

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 49b385628de6..951551f8bfc0 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -981,6 +981,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();
@@ -990,6 +991,7 @@ ErrCode GraphicFilter::readJPEG(SvStream & rStream, Graphic 
& rGraphic, GfxLinkT
             aTransform.rotate(aRotation);
         }
     }
+    rStream.SetEndian(aOriginalEndianness);
 
     return aReturnCode;
 }

Reply via email to