<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_HEADER(3) manual page</title> </head> <body bgcolor='white'> <a href='#toc'>Table of Contents</a><p> <h2><a name='sect0' href='#toc0'>Name</a></h2> im_header_int, im_header_double, im_header_string, im_header_get, im_header_get_type, im_header_map - read fields from the image header <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> #include <vips/vips.h> <p> int im_header_int( IMAGE *image, const char *field, int *out ) <br> int im_header_double( IMAGE *image, const char *field, double *out ) <br> int im_header_string( IMAGE *image, const char *field, char **out ) <br> GType im_header_get_type( IMAGE *im, const char *field ); <br> int im_header_get( IMAGE *im, const char *field, GValue *value_copy ); <br> typedef void *(*im_header_map_fn)( IMAGE *, const char *, GValue *, void *, void * );<br> <br> void *im_header_map( IMAGE *im, im_header_map_fn fn, void *a, void *b );<br> <p> <h2><a name='sect2' href='#toc2'>Description</a></h2> <a href='im_header_int.3.html'><b>im_header_int(3)</b></a> reads the value of an integer header field. These are "Xsize", "Ysize", "Bands", "Bbits", "BandFmt", "Coding", and "Type", or any integer meta field. <p> <a href='im_header_double.3.html'><b>im_header_double(3)</b></a> reads the value of the integer header fields. These are "Xres", and "Yres", or any double meta field. <p> <a href='im_header_string.3.html'><b>im_header_string(3)</b></a> reads the value of the integer header fields. These are "Hist", and "filename" or any string meta field. <p> <a href='im_header_get_type.3.html'><b>im_header_get_type(3)</b></a> returns the GType (eg. G_TYPE_INT) for a field. It returns zero if the field does not exist. It does not set <a href='im_error.3.html'><b>im_error(3)</a> ,</b> so it’s useful for test for a field’s existence. <p> <a href='im_header_get.3.html'><b>im_header_get(3)</b></a> fills the GValue with a copy of the field value, if the field exists. The value should be zeroed but otherwise uninitialised. The value should be unset once the user has finished with it. <p> <a href='im_header_map.3.html'><b>im_header_map(3)</b></a> maps a function over all header fields, presenting the value of each field as a GValue. Return non-NULL from the map function to stop iteration early. It maps over the builtin fields first, then any meta fields. <p> <h2><a name='sect3' href='#toc3'>Return Value</a></h2> All functions returns 0 on success and -1 on error. <h2><a name='sect4' href='#toc4'>See Also</a></h2> <a href='im_close.3.html'>im_close(3)</a> , <a href='im_open.3.html'>im_open(3)</a> . <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Return Value</a></li> <li><a name='toc4' href='#sect4'>See Also</a></li> </ul> </body> </html>