Fix hash on bottom line after odd crops of YUV images.
authorCarl Hetherington <cth@carlh.net>
Sun, 16 Jun 2013 13:55:43 +0000 (14:55 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 16 Jun 2013 13:55:43 +0000 (14:55 +0100)
src/lib/image.cc

index 5f7d3f034199f020e6afe714da340663927b862d..0bff1a7ccfca18d9912b33e44dffa28e532c5f3c 100644 (file)
@@ -74,7 +74,7 @@ Image::line_factor (int n) const
 int
 Image::lines (int n) const
 {
-       return size().height / line_factor (n);
+       return rint (ceil (static_cast<double>(size().height) / line_factor (n)));
 }
 
 /** @return Number of components */