Port recent watermark changes to libvips

This commit is contained in:
Essem 2022-03-09 13:55:19 -06:00
parent d9a2e0bfb9
commit d5811503da
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -47,6 +47,8 @@ Napi::Value Watermark(const Napi::CallbackInfo &info) {
if (resize && append) { if (resize && append) {
watermark = watermark.thumbnail_image(width); watermark = watermark.thumbnail_image(width);
} else if (resize && yscale) {
watermark = watermark.thumbnail_image(width, VImage::option()->set("height", page_height * yscale)->set("size", VIPS_SIZE_FORCE));
} else if (resize) { } else if (resize) {
watermark = watermark.thumbnail_image( watermark = watermark.thumbnail_image(
VIPS_MAX_COORD, VImage::option()->set("height", page_height)); VIPS_MAX_COORD, VImage::option()->set("height", page_height));