diff --git a/vips/header.c b/vips/header.c index 110d88d8..efa17844 100644 --- a/vips/header.c +++ b/vips/header.c @@ -24,8 +24,10 @@ void remove_metadata(VipsImage *in) { for (int i = 0; fields[i] != NULL; i++) { if (strncmp(fields[i], VIPS_META_ICC_NAME, sizeof(VIPS_META_ICC_NAME)) && - strncmp(fields[i], VIPS_META_ORIENTATION, - sizeof(VIPS_META_ORIENTATION))) { + strncmp(fields[i], VIPS_META_ORIENTATION, sizeof(VIPS_META_ORIENTATION)) && + strncmp(fields[i], VIPS_META_N_PAGES, sizeof(VIPS_META_N_PAGES)) && + strncmp(fields[i], VIPS_META_PAGE_HEIGHT, sizeof(VIPS_META_PAGE_HEIGHT)) + ) { vips_image_remove(in, fields[i]); } }