diff --git a/libvips/iofuncs/generate.c b/libvips/iofuncs/generate.c index 826f1b62..fe61ee9a 100644 --- a/libvips/iofuncs/generate.c +++ b/libvips/iofuncs/generate.c @@ -741,7 +741,12 @@ vips_image_generate( VipsImage *image, */ if( res ) return( -1 ); - + + /* We've written to image ... rewind it ready for reading. + */ + if( vips_image_pio_input( image ) ) + return( -1 ); + break; default: