add missing funcs to public C API

The C API was missing vips_jpegload_source and vips_svgload_source.
Thanks to augustocdias.

See https://github.com/libvips/libvips/issues/1780
This commit is contained in:
John Cupitt 2020-08-14 13:36:12 +01:00
parent b981911f67
commit 633abe7be8
4 changed files with 46 additions and 6 deletions

View File

@ -1,3 +1,6 @@
14/8/20 started 8.11
- add vips_jpegload_source() and vips_svgload_source() to public C API
9/8/20 started 8.10.1
- fix markdown -> xml conversion in doc generation
- remove typedef redefinitions to please old gccs

View File

@ -2,7 +2,7 @@
# also update the version number in the m4 macros below
AC_INIT([vips], [8.10.1], [vipsip@jiscmail.ac.uk])
AC_INIT([vips], [8.11.0], [vipsip@jiscmail.ac.uk])
# required for gobject-introspection
AC_PREREQ(2.62)
@ -17,8 +17,8 @@ AC_CONFIG_MACRO_DIR([m4])
# user-visible library versioning
m4_define([vips_major_version], [8])
m4_define([vips_minor_version], [10])
m4_define([vips_micro_version], [1])
m4_define([vips_minor_version], [11])
m4_define([vips_micro_version], [0])
m4_define([vips_version],
[vips_major_version.vips_minor_version.vips_micro_version])
@ -37,9 +37,9 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r $srcdir/ChangeLog`
# binary interface changes backwards compatible?: increment age
# binary interface changes not backwards compatible?: reset age to 0
LIBRARY_CURRENT=54
LIBRARY_REVISION=3
LIBRARY_AGE=12
LIBRARY_CURRENT=55
LIBRARY_REVISION=0
LIBRARY_AGE=13
# patched into include/vips/version.h
AC_SUBST(VIPS_VERSION)

View File

@ -550,3 +550,36 @@ vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... )
return( result );
}
/**
* vips_jpegload_source:
* @source: source to load
* @out: (out): image to write
* @...: %NULL-terminated list of optional named arguments
*
* Optional arguments:
*
* * @shrink: %gint, shrink by this much on load
* * @fail: %gboolean, fail on errors
* * @autorotate: %gboolean, use exif Orientation tag to rotate the image
* during load
*
* Read a JPEG-formatted memory block into a VIPS image. Exactly as
* vips_jpegload(), but read from a source.
*
* See also: vips_jpegload().
*
* Returns: 0 on success, -1 on error.
*/
int
vips_jpegload_source( VipsSource *source, VipsImage **out, ... )
{
va_list ap;
int result;
va_start( ap, out );
result = vips_call_split( "jpegload_source", ap, source, out );
va_end( ap );
return( result );
}

View File

@ -383,6 +383,8 @@ int vips_jpegload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_jpegload_source( VipsSource *source, VipsImage **out, ... )
__attribute__((sentinel));
int vips_jpegsave_target( VipsImage *in, VipsTarget *target, ... )
__attribute__((sentinel));
@ -621,6 +623,8 @@ int vips_svgload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
int vips_svgload_buffer( void *buf, size_t len, VipsImage **out, ... )
__attribute__((sentinel));
int vips_svgload_source( VipsSource *source, VipsImage **out, ... )
__attribute__((sentinel));
int vips_gifload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));