From 6b3dc1e350f938bd6f95e558e1aec07bd282d79e Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 1 Feb 2014 22:58:30 +0000 Subject: [PATCH] Ensure crop occurs on y-axis --- src/sharp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sharp.cc b/src/sharp.cc index 35ea65e0..6908dbc3 100755 --- a/src/sharp.cc +++ b/src/sharp.cc @@ -151,7 +151,7 @@ void resize_async(uv_work_t *work) { g_object_unref(shrunk); VipsImage *canvased = vips_image_new(); - if (affined->Xsize != baton->width && affined->Ysize != baton->height) { + if (affined->Xsize != baton->width || affined->Ysize != baton->height) { if (baton->crop && affined->Xsize != baton->width && affined->Ysize != baton->height) { // Crop int width = std::min(affined->Xsize, baton->width);