seems to work
added some more consts as well
This commit is contained in:
parent
105760be0a
commit
b8a158b69b
@ -13,7 +13,8 @@
|
||||
- add vips_rect_overlapsrect()
|
||||
- composite is much faster at positioning subimages
|
||||
- dzsave has a new skip_blanks option
|
||||
- add CMYK as a supported colourspace
|
||||
- add vips_CMYK2XYZ() and vips_XYZ2CMYK(), plus associated routes
|
||||
- include cmyk and srgb fallback profiles
|
||||
|
||||
21/11/18 started 8.7.3
|
||||
- fix infinite loop for autofit with non-scaleable font
|
||||
|
@ -407,7 +407,7 @@ public:
|
||||
const void *
|
||||
get_blob( const char *field, size_t *length ) const
|
||||
{
|
||||
void *value;
|
||||
const void *value;
|
||||
|
||||
if( vips_image_get_blob( this->get_image(), field,
|
||||
&value, length ) )
|
||||
|
@ -87,7 +87,7 @@ vips__fallback_profile_get_init( void )
|
||||
fallback->name = vips__coded_profiles[i].name;
|
||||
fallback->data = data;
|
||||
fallback->data_length = data_length;
|
||||
vips_fallback_profile_list = g_slist_append(
|
||||
vips_fallback_profile_list = g_slist_prepend(
|
||||
vips_fallback_profile_list, fallback );
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ libcolour_la_SOURCES = \
|
||||
scRGB2sRGB.c
|
||||
|
||||
profiles.c:
|
||||
./wrap_profiles.sh profiles profiles.c
|
||||
./wrap-profiles.sh profiles profiles.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
profiles \
|
||||
|
@ -620,7 +620,7 @@ vips_icc_get_profile_file( const char *filename )
|
||||
static VipsBlob *
|
||||
vips_icc_get_profile_image( VipsImage *image )
|
||||
{
|
||||
void *data;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( !vips_image_get_typeof( image, VIPS_META_ICC_NAME ) )
|
||||
@ -728,7 +728,7 @@ vips_icc_import_build( VipsObject *object )
|
||||
*/
|
||||
if( import->used_fallback &&
|
||||
icc->in_blob ) {
|
||||
void *data;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
data = vips_blob_get( icc->in_blob, &size );
|
||||
@ -1269,7 +1269,7 @@ vips_icc_ac2rc( VipsImage *in, VipsImage **out, const char *profile_filename )
|
||||
*/
|
||||
gboolean
|
||||
vips_icc_is_compatible_profile( VipsImage *image,
|
||||
void *data, size_t data_length )
|
||||
const void *data, size_t data_length )
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include "profiles.h"
|
||||
|
||||
VipsCodedProfile vips__coded_profiles[] = {
|
||||
{ "cmyk",
|
||||
VipsCodedProfile vips__coded_profiles[] = {
|
||||
{ "cmyk",
|
||||
"AA6sbGFyZ2wCIAAAcHJ0ckNNWUtMYWIgB94ACAAZAAwAKAA1YWNzcE1TRlQAAAAAAAAAAAAAAAAA"
|
||||
"AAAAAAAAAAAAAAEAAPbWAAEAAAAA0y1hcmdsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
"AAAAAAAAAAAAAAAAAAAAAAAPZGVzYwAAATgAAABpY3BydAAAAaQAAABnd3RwdAAAAgwAAAAUYmtw"
|
||||
@ -16875,6 +16875,130 @@ VipsCodedProfile vips__coded_profiles[] = {
|
||||
"LjI5IDMuOTIgMy41NyAzLjIzIDMuMDUgMy40IDQuMjUgNC43NCAzLjc1IDIuNDggMS45NCAxLjcz"
|
||||
"IDEuNDYgMS40IDEuODMgMi41OCAyLjk0IDIuOTUgMi45NCAyLjk1IDIuOTggMy4zMiAzLjk5IDQu"
|
||||
"NDIgNC4yOCAzLjk0IDMuNDcgMy4xMyAzLjM1IDQuMjENCkVORF9EQVRBDQoNCg0KDQoNCgAA"
|
||||
},
|
||||
{ 0, 0 }
|
||||
},
|
||||
{ "sRGB",
|
||||
"AAAbCmxjbXMCMAAAbW50clJHQiBYWVogB9QACAANAAwAEgAGYWNzcE1TRlQAAAAAbGNtcwAAAAAA"
|
||||
"AAAAAAAAAAAAAAAAAPbWAAEAAAAA0y1sY21zAAAAAAAAAAAAAAAAAAAAAA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oS+/796v/XAcMDs"
|
||||
"wWfB48JfwtvDWMPUxFHEzsVLxcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbP"
|
||||
"N8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp22vvbgNwF3IrdEN2W"
|
||||
"3hzeot8p36/gNuC94UThzOJT4tvjY+Pr5HPk/OWE5g3mlucf56noMui86Ubp0Opb6uXrcOv77Ibt"
|
||||
"Ee2c7ijutO9A78zwWPDl8XLx//KM8xnzp/Q09ML1UPXe9m32+/eK+Bn4qPk4+cf6V/rn+3f8B/yY"
|
||||
"/Sn9uv5L/tz/bf//Y2hybQAAAAAAAwAAAACj1wAAVHsAAEzNAACZmgAAJmYAAA9cdGV4dAAAAABu"
|
||||
"byBjb3B5cmlnaHQsIHVzZSBmcmVlbHkACg=="
|
||||
},
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
@ -158,7 +158,7 @@ show_values( ExifData *data )
|
||||
* their default value and we won't know about it.
|
||||
*/
|
||||
static ExifData *
|
||||
vips_exif_load_data_without_fix( void *data, int length )
|
||||
vips_exif_load_data_without_fix( const void *data, int length )
|
||||
{
|
||||
ExifData *ed;
|
||||
|
||||
@ -458,17 +458,17 @@ vips_exif_resolution_from_image( ExifData *ed, VipsImage *image );
|
||||
int
|
||||
vips__exif_parse( VipsImage *image )
|
||||
{
|
||||
void *data;
|
||||
size_t length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
ExifData *ed;
|
||||
VipsExifParams params;
|
||||
const char *str;
|
||||
|
||||
if( !vips_image_get_typeof( image, VIPS_META_EXIF_NAME ) )
|
||||
return( 0 );
|
||||
if( vips_image_get_blob( image, VIPS_META_EXIF_NAME, &data, &length ) )
|
||||
if( vips_image_get_blob( image, VIPS_META_EXIF_NAME, &data, &size ) )
|
||||
return( -1 );
|
||||
if( !(ed = vips_exif_load_data_without_fix( data, length )) )
|
||||
if( !(ed = vips_exif_load_data_without_fix( data, size )) )
|
||||
return( -1 );
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
@ -1055,21 +1055,21 @@ vips_exif_set_thumbnail( ExifData *ed, VipsImage *im )
|
||||
/* Update EXIF thumbnail from metadata, if any.
|
||||
*/
|
||||
if( vips_image_get_typeof( im, "jpeg-thumbnail-data" ) ) {
|
||||
void *data;
|
||||
size_t length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( vips_image_get_blob( im, "jpeg-thumbnail-data",
|
||||
&data, &length ) )
|
||||
&data, &size ) )
|
||||
return( -1 );
|
||||
|
||||
/* Again, we should use the exif allocator attached to this
|
||||
* entry, but it is not exposed!
|
||||
*/
|
||||
if( length > 0 &&
|
||||
if( size > 0 &&
|
||||
data ) {
|
||||
ed->data = malloc( length );
|
||||
memcpy( ed->data, data, length );
|
||||
ed->size = length;
|
||||
ed->data = malloc( size );
|
||||
memcpy( ed->data, data, size );
|
||||
ed->size = size;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1518,12 +1518,12 @@ vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready,
|
||||
* want to silently drop the profile in this case.
|
||||
*/
|
||||
if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) {
|
||||
void *data;
|
||||
size_t length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( !vips_image_get_blob( in, VIPS_META_ICC_NAME,
|
||||
&data, &length ) &&
|
||||
!vips_icc_is_compatible_profile( in, data, length ) )
|
||||
&data, &size ) &&
|
||||
!vips_icc_is_compatible_profile( in, data, size ) )
|
||||
vips_image_remove( in, VIPS_META_ICC_NAME );
|
||||
}
|
||||
|
||||
|
@ -375,18 +375,16 @@ write_profile_file( Write *write, const char *profile )
|
||||
static int
|
||||
write_profile_meta( Write *write )
|
||||
{
|
||||
void *data;
|
||||
size_t data_length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( vips_image_get_blob( write->in, VIPS_META_ICC_NAME,
|
||||
&data, &data_length ) )
|
||||
if( vips_image_get_blob( write->in, VIPS_META_ICC_NAME, &data, &size ) )
|
||||
return( -1 );
|
||||
|
||||
write_profile_data( &write->cinfo, data, data_length );
|
||||
write_profile_data( &write->cinfo, data, size );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "write_profile_meta: attached %zd byte profile from header\n",
|
||||
data_length );
|
||||
size );
|
||||
#endif /*DEBUG*/
|
||||
|
||||
return( 0 );
|
||||
|
@ -351,12 +351,12 @@ embed_profile_file( TIFF *tif, const char *profile )
|
||||
static int
|
||||
embed_profile_meta( TIFF *tif, VipsImage *im )
|
||||
{
|
||||
void *data;
|
||||
size_t data_length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( vips_image_get_blob( im, VIPS_META_ICC_NAME, &data, &data_length ) )
|
||||
if( vips_image_get_blob( im, VIPS_META_ICC_NAME, &data, &size ) )
|
||||
return( -1 );
|
||||
TIFFSetField( tif, TIFFTAG_ICCPROFILE, data_length, data );
|
||||
TIFFSetField( tif, TIFFTAG_ICCPROFILE, size, data );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips2tiff: attached profile from meta\n" );
|
||||
@ -442,15 +442,14 @@ wtiff_embed_profile( Wtiff *wtiff, TIFF *tif )
|
||||
static int
|
||||
wtiff_embed_xmp( Wtiff *wtiff, TIFF *tif )
|
||||
{
|
||||
void *data;
|
||||
size_t data_length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( !vips_image_get_typeof( wtiff->im, VIPS_META_XMP_NAME ) )
|
||||
return( 0 );
|
||||
if( vips_image_get_blob( wtiff->im, VIPS_META_XMP_NAME,
|
||||
&data, &data_length ) )
|
||||
if( vips_image_get_blob( wtiff->im, VIPS_META_XMP_NAME, &data, &size ) )
|
||||
return( -1 );
|
||||
TIFFSetField( tif, TIFFTAG_XMLPACKET, data_length, data );
|
||||
TIFFSetField( tif, TIFFTAG_XMLPACKET, size, data );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips2tiff: attached XMP from meta\n" );
|
||||
@ -462,27 +461,27 @@ wtiff_embed_xmp( Wtiff *wtiff, TIFF *tif )
|
||||
static int
|
||||
wtiff_embed_iptc( Wtiff *wtiff, TIFF *tif )
|
||||
{
|
||||
void *data;
|
||||
size_t data_length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( !vips_image_get_typeof( wtiff->im, VIPS_META_IPTC_NAME ) )
|
||||
return( 0 );
|
||||
if( vips_image_get_blob( wtiff->im, VIPS_META_IPTC_NAME,
|
||||
&data, &data_length ) )
|
||||
&data, &size ) )
|
||||
return( -1 );
|
||||
|
||||
/* For no very good reason, libtiff stores IPTC as an array of
|
||||
* long, not byte.
|
||||
*/
|
||||
if( data_length & 3 ) {
|
||||
if( size & 3 ) {
|
||||
g_warning( "%s", _( "rounding up IPTC data length" ) );
|
||||
data_length /= 4;
|
||||
data_length += 1;
|
||||
size /= 4;
|
||||
size += 1;
|
||||
}
|
||||
else
|
||||
data_length /= 4;
|
||||
size /= 4;
|
||||
|
||||
TIFFSetField( tif, TIFFTAG_RICHTIFFIPTC, data_length, data );
|
||||
TIFFSetField( tif, TIFFTAG_RICHTIFFIPTC, size, data );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips2tiff: attached IPTC from meta\n" );
|
||||
@ -494,15 +493,15 @@ wtiff_embed_iptc( Wtiff *wtiff, TIFF *tif )
|
||||
static int
|
||||
wtiff_embed_photoshop( Wtiff *wtiff, TIFF *tif )
|
||||
{
|
||||
void *data;
|
||||
size_t data_length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( !vips_image_get_typeof( wtiff->im, VIPS_META_PHOTOSHOP_NAME ) )
|
||||
return( 0 );
|
||||
if( vips_image_get_blob( wtiff->im,
|
||||
VIPS_META_PHOTOSHOP_NAME, &data, &data_length ) )
|
||||
VIPS_META_PHOTOSHOP_NAME, &data, &size ) )
|
||||
return( -1 );
|
||||
TIFFSetField( tif, TIFFTAG_PHOTOSHOP, data_length, data );
|
||||
TIFFSetField( tif, TIFFTAG_PHOTOSHOP, size, data );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips2tiff: attached photoshop data from meta\n" );
|
||||
|
@ -410,7 +410,7 @@ vips_webp_set_count( VipsWebPWrite *write, int loop_count )
|
||||
|
||||
static int
|
||||
vips_webp_set_chunk( VipsWebPWrite *write,
|
||||
const char *webp_name, void *data, size_t length )
|
||||
const char *webp_name, const void *data, size_t length )
|
||||
{
|
||||
WebPData chunk;
|
||||
|
||||
@ -440,7 +440,7 @@ vips_webp_add_chunks( VipsWebPWrite *write, VipsImage *image )
|
||||
const char *webp_name = vips__webp_names[i].webp;
|
||||
|
||||
if( vips_image_get_typeof( image, vips_name ) ) {
|
||||
void *data;
|
||||
const void *data;
|
||||
size_t length;
|
||||
|
||||
if( vips_image_get_blob( image,
|
||||
|
@ -1091,36 +1091,36 @@ write_vips( Write *write,
|
||||
}
|
||||
else if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) &&
|
||||
!strip ) {
|
||||
void *data;
|
||||
size_t length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
|
||||
if( vips_image_get_blob( in, VIPS_META_ICC_NAME,
|
||||
&data, &length ) )
|
||||
&data, &size ) )
|
||||
return( -1 );
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "write_vips: attaching %zd bytes of ICC profile\n",
|
||||
length );
|
||||
size );
|
||||
#endif /*DEBUG*/
|
||||
|
||||
png_set_iCCP( write->pPng, write->pInfo, "icc",
|
||||
PNG_COMPRESSION_TYPE_BASE, data, length );
|
||||
PNG_COMPRESSION_TYPE_BASE, data, size );
|
||||
}
|
||||
|
||||
if( vips_image_get_typeof( in, VIPS_META_XMP_NAME ) ) {
|
||||
void *data;
|
||||
size_t length;
|
||||
const void *data;
|
||||
size_t size;
|
||||
char *str;
|
||||
|
||||
/* XMP is attached as a BLOB with no null-termination. We
|
||||
* must re-add this.
|
||||
*/
|
||||
if( vips_image_get_blob( in,
|
||||
VIPS_META_XMP_NAME, &data, &length ) )
|
||||
VIPS_META_XMP_NAME, &data, &size ) )
|
||||
return( -1 );
|
||||
|
||||
str = g_malloc( length + 1 );
|
||||
vips_strncpy( str, data, length + 1 );
|
||||
str = g_malloc( size + 1 );
|
||||
vips_strncpy( str, data, size + 1 );
|
||||
vips__png_set_text( write->pPng, write->pInfo,
|
||||
"XML:com.adobe.xmp", str );
|
||||
g_free( str );
|
||||
|
@ -183,7 +183,7 @@ int vips_icc_export( VipsImage *in, VipsImage **out, ... )
|
||||
int vips_icc_ac2rc( VipsImage *in, VipsImage **out,
|
||||
const char *profile_filename );
|
||||
gboolean vips_icc_is_compatible_profile( VipsImage *image,
|
||||
void *data, size_t data_length );
|
||||
const void *data, size_t data_length );
|
||||
|
||||
int vips_dE76( VipsImage *left, VipsImage *right, VipsImage **out, ... )
|
||||
__attribute__((sentinel));
|
||||
|
@ -194,11 +194,12 @@ void vips_image_set_area( VipsImage *image,
|
||||
int vips_image_get_area( const VipsImage *image,
|
||||
const char *name, void **data );
|
||||
void vips_image_set_blob( VipsImage *image,
|
||||
const char *name, VipsCallbackFn free_fn, void *data, size_t length );
|
||||
const char *name,
|
||||
VipsCallbackFn free_fn, const void *data, size_t length );
|
||||
void vips_image_set_blob_copy( VipsImage *image,
|
||||
const char *name, const void *data, size_t length );
|
||||
int vips_image_get_blob( const VipsImage *image, const char *name,
|
||||
void **data, size_t *length );
|
||||
int vips_image_get_blob( const VipsImage *image,
|
||||
const char *name, const void **data, size_t *length );
|
||||
|
||||
int vips_image_get_int( const VipsImage *image, const char *name, int *out );
|
||||
void vips_image_set_int( VipsImage *image, const char *name, int i );
|
||||
|
@ -158,9 +158,9 @@ typedef struct _VipsBlob {
|
||||
} VipsBlob;
|
||||
|
||||
VipsBlob *vips_blob_new( VipsCallbackFn free_fn,
|
||||
const void *data, size_t size );
|
||||
VipsBlob *vips_blob_copy( const void *data, size_t size );
|
||||
const void *vips_blob_get( VipsBlob *blob, size_t *size );
|
||||
const void *data, size_t length );
|
||||
VipsBlob *vips_blob_copy( const void *data, size_t length );
|
||||
const void *vips_blob_get( VipsBlob *blob, size_t *length );
|
||||
GType vips_blob_get_type(void);
|
||||
|
||||
/**
|
||||
@ -224,7 +224,7 @@ void vips_value_set_ref_string( GValue *value, const char *str );
|
||||
|
||||
void *vips_value_get_blob( const GValue *value, size_t *length );
|
||||
void vips_value_set_blob( GValue *value,
|
||||
VipsCallbackFn free_fn, void *data, size_t length );
|
||||
VipsCallbackFn free_fn, const void *data, size_t length );
|
||||
void vips_value_set_blob_free( GValue *value, void *data, size_t length );
|
||||
|
||||
void vips_value_set_array( GValue *value,
|
||||
|
@ -1365,13 +1365,13 @@ vips_image_get_area( const VipsImage *image, const char *name, void **data )
|
||||
* See also: vips_image_get_blob(), vips_image_set().
|
||||
*/
|
||||
void
|
||||
vips_image_set_blob( VipsImage *image,
|
||||
const char *name, VipsCallbackFn free_fn, void *data, size_t length )
|
||||
vips_image_set_blob( VipsImage *image, const char *name,
|
||||
VipsCallbackFn free_fn, const void *data, size_t size )
|
||||
{
|
||||
GValue value = { 0 };
|
||||
|
||||
g_value_init( &value, VIPS_TYPE_BLOB );
|
||||
vips_value_set_blob( &value, free_fn, data, length );
|
||||
vips_value_set_blob( &value, free_fn, data, size );
|
||||
vips_image_set( image, name, &value );
|
||||
g_value_unset( &value );
|
||||
}
|
||||
@ -1431,7 +1431,7 @@ vips_image_set_blob_copy( VipsImage *image,
|
||||
*/
|
||||
int
|
||||
vips_image_get_blob( const VipsImage *image, const char *name,
|
||||
void **data, size_t *length )
|
||||
const void **data, size_t *length )
|
||||
{
|
||||
GValue value_copy = { 0 };
|
||||
|
||||
|
@ -599,8 +599,8 @@ vips_ref_string_get_type( void )
|
||||
/**
|
||||
* vips_blob_new:
|
||||
* @free_fn: (scope async) (allow-none): @data will be freed with this function
|
||||
* @data: (array length=size) (element-type guint8) (transfer full): data to store
|
||||
* @size: number of bytes in @data
|
||||
* @data: (array length=length) (element-type guint8) (transfer full): data to store
|
||||
* @length: number of bytes in @data
|
||||
*
|
||||
* Like vips_area_new(), but track a length as well. The returned #VipsBlob
|
||||
* takes ownership of @data and will free it with @free_fn. Pass NULL for
|
||||
@ -614,20 +614,20 @@ vips_ref_string_get_type( void )
|
||||
* Returns: (transfer full): the new #VipsBlob.
|
||||
*/
|
||||
VipsBlob *
|
||||
vips_blob_new( VipsCallbackFn free_fn, const void *data, size_t size )
|
||||
vips_blob_new( VipsCallbackFn free_fn, const void *data, size_t length )
|
||||
{
|
||||
VipsArea *area;
|
||||
|
||||
area = vips_area_new( free_fn, (void *) data );
|
||||
area->length = size;
|
||||
area->length = length;
|
||||
|
||||
return( (VipsBlob *) area );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_blob_copy:
|
||||
* @data: (array length=size) (element-type guint8) (transfer none): data to store
|
||||
* @size: number of bytes in @data
|
||||
* @data: (array length=length) (element-type guint8) (transfer none): data to store
|
||||
* @length: number of bytes in @data
|
||||
*
|
||||
* Like vips_blob_new(), but take a copy of the data. Useful for bindings
|
||||
* which strugle with callbacks.
|
||||
@ -637,15 +637,15 @@ vips_blob_new( VipsCallbackFn free_fn, const void *data, size_t size )
|
||||
* Returns: (transfer full): the new #VipsBlob.
|
||||
*/
|
||||
VipsBlob *
|
||||
vips_blob_copy( const void *data, size_t size )
|
||||
vips_blob_copy( const void *data, size_t length )
|
||||
{
|
||||
void *data_copy;
|
||||
VipsArea *area;
|
||||
|
||||
data_copy = vips_malloc( NULL, size );
|
||||
memcpy( data_copy, data, size );
|
||||
data_copy = vips_malloc( NULL, length );
|
||||
memcpy( data_copy, data, length );
|
||||
area = vips_area_new( (VipsCallbackFn) g_free, data_copy );
|
||||
area->length = size;
|
||||
area->length = length;
|
||||
|
||||
return( (VipsBlob *) area );
|
||||
}
|
||||
@ -653,19 +653,19 @@ vips_blob_copy( const void *data, size_t size )
|
||||
/**
|
||||
* vips_blob_get:
|
||||
* @blob: #VipsBlob to fetch from
|
||||
* @size: return number of bytes of data
|
||||
* @length: return number of bytes of data
|
||||
*
|
||||
* Get the data from a #VipsBlob.
|
||||
*
|
||||
* See also: vips_blob_new().
|
||||
*
|
||||
* Returns: (array length=size) (element-type guint8) (transfer none): the data
|
||||
* Returns: (array length=length) (element-type guint8) (transfer none): the data
|
||||
*/
|
||||
const void *
|
||||
vips_blob_get( VipsBlob *blob, size_t *size )
|
||||
vips_blob_get( VipsBlob *blob, size_t *length )
|
||||
{
|
||||
return( vips_area_get_data( VIPS_AREA( blob ),
|
||||
size, NULL, NULL, NULL ) );
|
||||
length, NULL, NULL, NULL ) );
|
||||
}
|
||||
|
||||
/* Transform a blob to a G_TYPE_STRING.
|
||||
@ -674,12 +674,12 @@ static void
|
||||
transform_blob_g_string( const GValue *src_value, GValue *dest_value )
|
||||
{
|
||||
void *blob;
|
||||
size_t blob_length;
|
||||
size_t length;
|
||||
char buf[256];
|
||||
|
||||
blob = vips_value_get_blob( src_value, &blob_length );
|
||||
blob = vips_value_get_blob( src_value, &length );
|
||||
vips_snprintf( buf, 256, "VIPS_TYPE_BLOB, data = %p, length = %zd",
|
||||
blob, blob_length );
|
||||
blob, length );
|
||||
g_value_set_string( dest_value, buf );
|
||||
}
|
||||
|
||||
@ -689,11 +689,11 @@ static void
|
||||
transform_blob_save_string( const GValue *src_value, GValue *dest_value )
|
||||
{
|
||||
void *blob;
|
||||
size_t blob_length;
|
||||
size_t length;
|
||||
char *b64;
|
||||
|
||||
blob = vips_value_get_blob( src_value, &blob_length );
|
||||
if( (b64 = vips__b64_encode( blob, blob_length )) ) {
|
||||
blob = vips_value_get_blob( src_value, &length );
|
||||
if( (b64 = vips__b64_encode( blob, length )) ) {
|
||||
vips_value_set_save_string( dest_value, b64 );
|
||||
vips_free( b64 );
|
||||
}
|
||||
@ -709,12 +709,12 @@ transform_save_string_blob( const GValue *src_value, GValue *dest_value )
|
||||
{
|
||||
const char *b64;
|
||||
void *blob;
|
||||
size_t blob_length;
|
||||
size_t length;
|
||||
|
||||
b64 = vips_value_get_save_string( src_value );
|
||||
if( (blob = vips__b64_decode( b64, &blob_length )) )
|
||||
if( (blob = vips__b64_decode( b64, &length )) )
|
||||
vips_value_set_blob( dest_value,
|
||||
(VipsCallbackFn) vips_free, blob, blob_length );
|
||||
(VipsCallbackFn) vips_free, blob, length );
|
||||
else
|
||||
/* No error return from transform, but we should set it to
|
||||
* something.
|
||||
@ -1556,7 +1556,7 @@ vips_value_set_ref_string( GValue *value, const char *str )
|
||||
* @length: length of memory area
|
||||
*
|
||||
* Sets @value to hold a @data. When @value is freed, @data will be
|
||||
* freed with @free_fn. @value also holds a note of the length of the memory
|
||||
* freed with @free_fn. @value also holds a note of the size of the memory
|
||||
* area.
|
||||
*
|
||||
* blobs are things like ICC profiles or EXIF data. They are relocatable, and
|
||||
@ -1567,7 +1567,7 @@ vips_value_set_ref_string( GValue *value, const char *str )
|
||||
*/
|
||||
void
|
||||
vips_value_set_blob( GValue *value,
|
||||
VipsCallbackFn free_fn, void *data, size_t length )
|
||||
VipsCallbackFn free_fn, const void *data, size_t length )
|
||||
{
|
||||
VipsBlob *blob;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user