aboutsummaryrefslogtreecommitdiff
path: root/graphics/openexr/files/patch-exrmakepreview_makePreview.cpp
blob: 1654923d7465ab9c7064ecc0d5add752e23cd821 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- exrmakepreview/makePreview.cpp.orig	2018-08-10 01:35:00 UTC
+++ exrmakepreview/makePreview.cpp
@@ -110,7 +110,7 @@ generatePreview (const char inFileName[],
     int h = dw.max.y - dw.min.y + 1;
 
     Array2D <Rgba> pixels (h, w);
-    in.setFrameBuffer (&pixels[0][0] - dw.min.y * w - dw.min.x, 1, w);
+    in.setFrameBuffer (ComputeBasePointer (&pixels[0][0], dw), 1, w);
     in.readPixels (dw.min.y, dw.max.y);
 
     //