added vips_image_get_data()
something to get the pixel data pointer
This commit is contained in:
parent
ec56a691dc
commit
daf915fafb
@ -53,6 +53,7 @@
|
||||
- tiff reader can do 1, 2, 4, 8 bit palette images
|
||||
- tiff palette read can do mono images
|
||||
- im_bufjpeg2vips() has a "header_only" parameter
|
||||
- added vips_image_get_data()
|
||||
|
||||
30/11/10 started 7.24.0
|
||||
- bump for new stable
|
||||
|
@ -1053,12 +1053,6 @@ im_bufjpeg2vips( void *buf, size_t len, IMAGE *out, gboolean header_only )
|
||||
return( result );
|
||||
}
|
||||
|
||||
int
|
||||
jpeg2vips_header( const char *name, IMAGE *out )
|
||||
{
|
||||
return( jpeg2vips( name, out, TRUE ) );
|
||||
}
|
||||
|
||||
static int
|
||||
isjpeg( const char *filename )
|
||||
{
|
||||
|
@ -84,6 +84,7 @@ int vips_image_get_xoffset( VipsImage *image );
|
||||
int vips_image_get_yoffset( VipsImage *image );
|
||||
const char *vips_image_get_filename( VipsImage *image );
|
||||
const char *vips_image_get_mode( VipsImage *image );
|
||||
void *vips_image_get_data( VipsImage *image );;
|
||||
|
||||
void vips_image_init_fields( VipsImage *image,
|
||||
int xsize, int ysize, int bands,
|
||||
|
@ -414,6 +414,27 @@ vips_image_get_mode( VipsImage *image )
|
||||
return( image->mode );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_image_get_data:
|
||||
* @image: image to get data for
|
||||
*
|
||||
* Return a pointer to the image's pixel data, if possible. This can involve
|
||||
* allocating large amounts of memory and performing a long computation. Image
|
||||
* pixels are laid out in band-packed rows.
|
||||
*
|
||||
* See also: vips_image_wio_input().
|
||||
*
|
||||
* Returns: a pointer to pixel data, if possible.
|
||||
*/
|
||||
void *
|
||||
vips_image_get_data( VipsImage *image )
|
||||
{
|
||||
if( vips_image_wio_input( image ) )
|
||||
return( NULL );
|
||||
|
||||
return( image->data );
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_image_init_fields:
|
||||
* @image: image to init
|
||||
|
Loading…
x
Reference in New Issue
Block a user