note VImage::new_from_memory_steal() in ChangeLog
plus doxy commnets etc., see https://github.com/libvips/libvips/pull/1758/
This commit is contained in:
parent
62e1cb4862
commit
fd0a0905ff
@ -3,6 +3,7 @@
|
|||||||
- integrate doxygen in build system to generate C++ API docs
|
- integrate doxygen in build system to generate C++ API docs
|
||||||
- improve C++ API doc comments
|
- improve C++ API doc comments
|
||||||
- add VipsInterpolate and guint64 support to C++ API
|
- add VipsInterpolate and guint64 support to C++ API
|
||||||
|
- add VImage::new_from_memory_steal [Zeranoe]
|
||||||
|
|
||||||
6/9/20 started 8.10.2
|
6/9/20 started 8.10.2
|
||||||
- update magicksave/load profile handling [kelilevi]
|
- update magicksave/load profile handling [kelilevi]
|
||||||
|
@ -641,6 +641,22 @@ VImage::new_from_source( VSource source, const char *option_string,
|
|||||||
return( out );
|
return( out );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VImage
|
||||||
|
VImage::new_from_memory_steal( void *data, size_t size,
|
||||||
|
int width, int height, int bands, VipsBandFormat format )
|
||||||
|
{
|
||||||
|
VipsImage *image;
|
||||||
|
|
||||||
|
if( !(image = vips_image_new_from_memory( data, size,
|
||||||
|
width, height, bands, format )) )
|
||||||
|
throw( VError() );
|
||||||
|
|
||||||
|
g_signal_connect( image, "postclose",
|
||||||
|
G_CALLBACK( vips_image_free_buffer ), data);
|
||||||
|
|
||||||
|
return( VImage( image ) );
|
||||||
|
}
|
||||||
|
|
||||||
VImage
|
VImage
|
||||||
VImage::new_matrix( int width, int height )
|
VImage::new_matrix( int width, int height )
|
||||||
{
|
{
|
||||||
|
@ -862,11 +862,23 @@ public:
|
|||||||
return( VImage( image ) );
|
return( VImage( image ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new VImage object from an area of memory containing a
|
||||||
|
* C-style array.
|
||||||
|
*
|
||||||
|
* The VImage steals ownership of @data and will free() it when it
|
||||||
|
* goes out of scope.
|
||||||
|
*/
|
||||||
|
static VImage
|
||||||
|
new_from_memory_steal( void *data, size_t size,
|
||||||
|
int width, int height, int bands, VipsBandFormat format );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a matrix image of a specified size. All elements will be
|
* Create a matrix image of a specified size. All elements will be
|
||||||
* zero.
|
* zero.
|
||||||
*/
|
*/
|
||||||
static VImage new_matrix( int width, int height );
|
static VImage
|
||||||
|
new_matrix( int width, int height );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a matrix image of a specified size, initialized from the
|
* Create a matrix image of a specified size, initialized from the
|
||||||
@ -917,22 +929,6 @@ public:
|
|||||||
return( new_from_image( to_vectorv( 1, pixel ) ) );
|
return( new_from_image( to_vectorv( 1, pixel ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static VImage
|
|
||||||
new_from_memory_steal( void *data, size_t size,
|
|
||||||
int width, int height, int bands, VipsBandFormat format )
|
|
||||||
{
|
|
||||||
VipsImage *image;
|
|
||||||
|
|
||||||
if( !(image = vips_image_new_from_memory( data, size,
|
|
||||||
width, height, bands, format )) )
|
|
||||||
throw( VError() );
|
|
||||||
|
|
||||||
g_signal_connect( image, "postclose",
|
|
||||||
G_CALLBACK(vips_image_free_buffer), data);
|
|
||||||
|
|
||||||
return( VImage( image ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a new image by rendering self to a large memory area,
|
* Make a new image by rendering self to a large memory area,
|
||||||
* wrapping a VImage around it, and copying all metadata over from
|
* wrapping a VImage around it, and copying all metadata over from
|
||||||
|
@ -3878,7 +3878,7 @@ vips_band_format_iscomplex( VipsBandFormat format )
|
|||||||
* @buffer: the orignal buffer that was stolen
|
* @buffer: the orignal buffer that was stolen
|
||||||
*
|
*
|
||||||
* Free the externally allocated buffer found in the input image. This function
|
* Free the externally allocated buffer found in the input image. This function
|
||||||
* is intened to be used with g_signal_connect.
|
* is intended to be used with g_signal_connect.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vips_image_free_buffer( VipsImage *image, void *buffer )
|
vips_image_free_buffer( VipsImage *image, void *buffer )
|
||||||
|
Loading…
Reference in New Issue
Block a user