Support identity transform when both width and height are not specified

This commit is contained in:
Lovell Fuller
2014-03-04 22:44:53 +00:00
parent f99e42d447
commit d0e6a4c0f3
3 changed files with 43 additions and 26 deletions

View File

@@ -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);