Fix crop on aligned images, which affected still image DCP generation.
authorCarl Hetherington <cth@carlh.net>
Sun, 3 Feb 2013 17:47:00 +0000 (17:47 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 3 Feb 2013 17:47:00 +0000 (17:47 +0000)
src/lib/image.cc

index 9223fdc5d0019cdfecbe2a2e20930c8546a7c426..0ec6bd26c7ef83cc0c004b1c370850f7ed908c4b 100644 (file)
@@ -240,8 +240,8 @@ Image::crop (Crop crop, bool aligned) const
                
                for (int y = 0; y < cropped_size.height; ++y) {
                        memcpy (out_p, in_p + crop_left_in_bytes, cropped_width_in_bytes);
-                       in_p += line_size()[c];
-                       out_p += out->line_size()[c];
+                       in_p += stride()[c];
+                       out_p += out->stride()[c];
                }
        }