diff --git a/TODO b/TODO index 08afcf18..794ae38e 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,3 @@ -- vips_image_readwrite() or whatever its called should signal invalidate or - mark the image as uncacheable or something - can we use postbuild elsewhere? look at use of "preclose" / "written", etc. diff --git a/libvips/iofuncs/image.c b/libvips/iofuncs/image.c index 7054b0b9..e189d184 100644 --- a/libvips/iofuncs/image.c +++ b/libvips/iofuncs/image.c @@ -2747,6 +2747,11 @@ vips_image_inplace( VipsImage *image ) return( -1 ); } + /* This image is about to be changed (probably). Make sure it's not + * in cache. + */ + vips_image_invalidate_all( image ); + return( 0 ); }