From 655da113c843769f4ceb481c5612b1a504c8f76d Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 1 Nov 2023 13:54:33 +0000 Subject: [PATCH] Ensure multi-page extract remains sequential #3837 --- docs/changelog.md | 3 +++ src/operations.cc | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 6d858ee8..87c92a9c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -27,6 +27,9 @@ Requires libvips v8.14.5 [#3823](https://github.com/lovell/sharp/pull/3823) [@uhthomas](https://github.com/uhthomas) +* Ensure multi-page extract remains sequential. + [#3837](https://github.com/lovell/sharp/issues/3837) + ## v0.32 - *flow* Requires libvips v8.14.5 diff --git a/src/operations.cc b/src/operations.cc index e59157ff..6fbe9906 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -370,6 +370,7 @@ namespace sharp { pages.reserve(nPages); // Split the image into cropped frames + image = StaySequential(image, VIPS_ACCESS_SEQUENTIAL); for (int i = 0; i < nPages; i++) { pages.push_back( image.extract_area(left, *pageHeight * i + top, width, height));