diff --git a/TODO b/TODO index 8f92ee04..225290be 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,12 @@ - try orc version of reducev? -- still see rounding problems on resize, try ghibli3 +- try + + $ vipsthumbnail ghibli_orig.jpg -s 600x1085 + $ vipsheader tn_ghibli_orig.jpg + tn_ghibli_orig.jpg: 599x1083 uchar, 3 bands, srgb, jpegload + diff --git a/libvips/resample/resize.c b/libvips/resample/resize.c index f7ae4fca..16002720 100644 --- a/libvips/resample/resize.c +++ b/libvips/resample/resize.c @@ -136,12 +136,12 @@ vips_resize_build( VipsObject *object ) * between our target size and the size we have after vips_shrink(). * * Aim for a little above target so we can't round down below it. + * + * This can break the aspect ratio slightly :/ but hopefully no one + * will notice. */ hresidual = ((double) target_width + 0.1) / in->Xsize; - if( vips_object_argument_isset( object, "vscale" ) ) - vresidual = ((double) target_height + 0.1) / in->Ysize; - else - vresidual = hresidual; + vresidual = ((double) target_height + 0.1) / in->Ysize; /* We want to make sure we read the image sequentially. * However, the convolution we may be doing later will force us