Allow no-stretch scaling of video content.
[dcpomatic.git] / src / lib / image.cc
index 9a3aa8d45b036557fcb6f0297cc92afbf519aeb1..d56b8763ae5d2df99770ded6105686c27613c611 100644 (file)
@@ -155,10 +155,7 @@ Image::post_process (string pp, bool aligned) const
 shared_ptr<Image>
 Image::crop (Crop crop, bool aligned) const
 {
-       libdcp::Size cropped_size = size ();
-       cropped_size.width -= crop.left + crop.right;
-       cropped_size.height -= crop.top + crop.bottom;
-
+       libdcp::Size cropped_size = crop.apply (size ());
        shared_ptr<Image> out (new Image (pixel_format(), cropped_size, aligned));
 
        for (int c = 0; c < components(); ++c) {