mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Support identity transform when both width and height are not specified
This commit is contained in:
@@ -132,9 +132,10 @@ void resize_async(uv_work_t *work) {
|
||||
factor = yfactor;
|
||||
baton->width = floor(in->Xsize * factor);
|
||||
} else {
|
||||
resize_error(baton, in);
|
||||
(baton->err).append("Width and/or height required");
|
||||
return;
|
||||
// Identity transform
|
||||
factor = 1;
|
||||
baton->width = in->Xsize;
|
||||
baton->height = in->Ysize;
|
||||
}
|
||||
|
||||
factor = std::max(factor, 1.0);
|
||||
|
||||
Reference in New Issue
Block a user