mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Ensure crop occurs on y-axis
This commit is contained in:
parent
7ffcdb79e0
commit
6b3dc1e350
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user