Limit HEIF output dimensions to 16384x16384

This is a slightly breaking change to sync with the behaviour of a
forthcoming libvips patch release. It also matches the libavif
limit. Having an arbitrary limit is safer than no limit.
This commit is contained in:
Lovell Fuller
2023-07-10 10:24:12 +01:00
parent d2f0fa855b
commit 5522060e9e
4 changed files with 22 additions and 0 deletions

View File

@@ -669,6 +669,10 @@ namespace sharp {
if (image.width() > 65535 || height > 65535) {
throw vips::VError("Processed image is too large for the GIF format");
}
} else if (imageType == ImageType::HEIF) {
if (image.width() > 16384 || height > 16384) {
throw vips::VError("Processed image is too large for the HEIF format");
}
}
}