Skip to content

Commit 7bcf0bb

Browse files
committed
don't cache thumbnail
thanks tomasc! see libvips/ruby-vips#109
1 parent 6a189d0 commit 7bcf0bb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- raise b64 limit to allow for huge profiles (thanks jaume)
44
- fix error return in blob save (thanks jaume)
55
- tag vipsprofile as py2 (thanks ioquatix)
6+
- don't cache thumbnail (thanks tomasc)
67

78
23/4/17 started 8.5.5
89
- doc polishing

libvips/resample/thumbnail.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* - from vipsthumbnail.c
66
* 6/1/17
77
* - add @size parameter
8+
* 29/5/17
9+
* - don't cache (thanks tomasc)
810
*/
911

1012
/*
@@ -514,6 +516,7 @@ vips_thumbnail_class_init( VipsThumbnailClass *class )
514516
{
515517
GObjectClass *gobject_class = G_OBJECT_CLASS( class );
516518
VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class );
519+
VipsOperationClass *operation_class = VIPS_OPERATION_CLASS( class );
517520

518521
gobject_class->dispose = vips_thumbnail_dispose;
519522
gobject_class->finalize = vips_thumbnail_finalize;
@@ -524,6 +527,11 @@ vips_thumbnail_class_init( VipsThumbnailClass *class )
524527
vobject_class->description = _( "thumbnail generation" );
525528
vobject_class->build = vips_thumbnail_build;
526529

530+
/* We mustn't cache these calls, since we open the file or buffer in
531+
* sequential mode.
532+
*/
533+
operation_class->flags = VIPS_OPERATION_NOCACHE;
534+
527535
VIPS_ARG_IMAGE( class, "out", 2,
528536
_( "Output" ),
529537
_( "Output image" ),

0 commit comments

Comments
 (0)