From 77a38ae87d56df946112b52e3ecf50a1ca401fa7 Mon Sep 17 00:00:00 2001 From: Hugh Sanderson Date: Tue, 16 Apr 2024 13:09:07 +0800 Subject: [PATCH] Allow for odd stride when rotating Jpg images --- project/src/common/SurfaceIO.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project/src/common/SurfaceIO.cpp b/project/src/common/SurfaceIO.cpp index 4ee3bbafe..98fe91f45 100644 --- a/project/src/common/SurfaceIO.cpp +++ b/project/src/common/SurfaceIO.cpp @@ -355,6 +355,7 @@ static Surface *TryJPEG(FILE *inFile,const uint8 *inData, int inDataLen, IAppDat RenderTarget target = result->BeginRender(Rect(imageW, imageH)); + int strideBytes = target.Row(1)-target.Row(0); while (cinfo.output_scanline < cinfo.output_height) { @@ -369,7 +370,7 @@ static Surface *TryJPEG(FILE *inFile,const uint8 *inData, int inDataLen, IAppDat for(int x=0; x