aboutsummaryrefslogtreecommitdiff
path: root/graphics/openexr/files/patch-exrmaketiled_Image.h
blob: 21aef45d03355bf310ba147a45a528a2c3ff14cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- exrmaketiled/Image.h.orig	2018-08-10 01:35:00 UTC
+++ exrmaketiled/Image.h
@@ -190,12 +190,12 @@ OPENEXR_IMF_INTERNAL_NAMESPACE::Slice
 TypedImageChannel<T>::slice () const
 {
     const IMATH_NAMESPACE::Box2i &dw = image().dataWindow();
-    int w = dw.max.x - dw.min.x + 1;
 
-    return OPENEXR_IMF_INTERNAL_NAMESPACE::Slice (pixelType(),
-		       (char *) (&_pixels[0][0] - dw.min.y * w - dw.min.x),
-		       sizeof (T),
-		       w * sizeof (T));
+    return OPENEXR_IMF_INTERNAL_NAMESPACE::Slice::Make (
+        pixelType(),
+        &_pixels[0][0],
+        dw,
+        sizeof (T));
 }