Ensure crop occurs on y-axis

This commit is contained in:
Lovell Fuller 2014-02-01 22:58:30 +00:00
parent 7ffcdb79e0
commit 6b3dc1e350

View File

@ -151,7 +151,7 @@ void resize_async(uv_work_t *work) {
g_object_unref(shrunk); g_object_unref(shrunk);
VipsImage *canvased = vips_image_new(); 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) { if (baton->crop && affined->Xsize != baton->width && affined->Ysize != baton->height) {
// Crop // Crop
int width = std::min(affined->Xsize, baton->width); int width = std::min(affined->Xsize, baton->width);