From f99da5f3e1ee0b585175a43b19cfbc4a49ae0a4e Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 1 Dec 2020 18:33:40 +0000 Subject: [PATCH 1/4] docs clarification https://github.com/libvips/libvips/issues/1912 --- libvips/iofuncs/sourcecustom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libvips/iofuncs/sourcecustom.c b/libvips/iofuncs/sourcecustom.c index 78e0e2fe..40815ba9 100644 --- a/libvips/iofuncs/sourcecustom.c +++ b/libvips/iofuncs/sourcecustom.c @@ -175,7 +175,7 @@ vips_source_custom_class_init( VipsSourceCustomClass *class ) * * This signal is emitted to read bytes from the source into @buffer. * - * Returns: the number of bytes read. + * Returns: the number of bytes read. Return 0 for EOF. */ vips_source_custom_signals[SIG_READ] = g_signal_new( "read", G_TYPE_FROM_CLASS( class ), @@ -229,7 +229,8 @@ vips_source_custom_new( void ) VIPS_DEBUG_MSG( "vips_source_custom_new:\n" ); - source_custom = VIPS_SOURCE_CUSTOM( g_object_new( VIPS_TYPE_SOURCE_CUSTOM, NULL ) ); + source_custom = VIPS_SOURCE_CUSTOM( + g_object_new( VIPS_TYPE_SOURCE_CUSTOM, NULL ) ); if( vips_object_build( VIPS_OBJECT( source_custom ) ) ) { VIPS_UNREF( source_custom ); From 4c1aeaacd9ee155fcfbdeeba4ea5ae97cb6359a2 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 2 Dec 2020 21:02:05 +0000 Subject: [PATCH 2/4] add is_a_source to ppmload ppmload_source was missing an ia_a test see https://github.com/libvips/libvips/issues/1915 --- libvips/foreign/ppmload.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libvips/foreign/ppmload.c b/libvips/foreign/ppmload.c index 7933c03b..51015d21 100644 --- a/libvips/foreign/ppmload.c +++ b/libvips/foreign/ppmload.c @@ -786,6 +786,7 @@ vips_foreign_load_ppm_source_class_init( VipsForeignLoadPpmFileClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *object_class = (VipsObjectClass *) class; + VipsForeignLoadClass *load_class = (VipsForeignLoadClass *) class; gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; @@ -793,6 +794,8 @@ vips_foreign_load_ppm_source_class_init( VipsForeignLoadPpmFileClass *class ) object_class->nickname = "ppmload_source"; object_class->build = vips_foreign_load_ppm_source_build; + load_class->is_a_source = vips_foreign_load_ppm_is_a_source; + VIPS_ARG_OBJECT( class, "source", 1, _( "Source" ), _( "Source to load from" ), From 587a7c2d63b0b47e549ebe8064dce15ef82c50ab Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 2 Dec 2020 21:03:44 +0000 Subject: [PATCH 3/4] note ppmload fix --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 292ba690..6d55c0cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ - fix msb_first default in ppm load and save [ewelot] - force binary mode on win for connection read / write [Alreiber] - better testing for output to target [barryspearce] +- ppmload_source was missing is_a [ewelot] 6/9/20 started 8.10.2 - update magicksave/load profile handling [kelilevi] From 1f71c7ae0776bfaf1138a2bfd0ebd738f9e9afda Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 3 Dec 2020 13:34:21 +0000 Subject: [PATCH 4/4] n comment --- libvips/foreign/heifload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvips/foreign/heifload.c b/libvips/foreign/heifload.c index 58d0f382..0e99b337 100644 --- a/libvips/foreign/heifload.c +++ b/libvips/foreign/heifload.c @@ -267,7 +267,7 @@ static const char *heif_magic[] = { "ftypavif" /* AV1 image format */ }; -/* THe API has: +/* The API has: * * enum heif_filetype_result result = heif_check_filetype( buf, 12 ); *