diff --git a/src/resize.cc b/src/resize.cc index e74d7051..e11b214d 100755 --- a/src/resize.cc +++ b/src/resize.cc @@ -459,6 +459,15 @@ class ResizeWorker : public NanAsyncWorker { return Error(); } vips_object_local(hook, gaussian); + // Sequential input requires a small linecache before use of convolution + if (baton->accessMethod == VIPS_ACCESS_SEQUENTIAL) { + VipsImage *lineCached; + if (vips_linecache(image, &lineCached, "access", VIPS_ACCESS_SEQUENTIAL, "tile_height", 1, "threaded", TRUE, NULL)) { + return Error(); + } + vips_object_local(hook, lineCached); + image = lineCached; + } // Apply Gaussian function VipsImage *blurred; if (vips_convsep(image, &blurred, gaussian, "precision", VIPS_PRECISION_INTEGER, NULL)) {