Top | Description | ![]() | ![]() | ![]() | ![]() |
constchar *vips_error_buffer (void
);
Get a pointer to the start of the error buffer as a C string.The string is owned by the error system and must not be freed.
See also:vips_error_clear()
.
char *vips_error_buffer_copy (void
);
Return a copy of the vips error buffer, and clear it.
voidvips_error_clear (void
);
Clear and reset the error buffer. This is typically called after presentingan error to the user.
See also:vips_error_buffer()
.
voidvips_error_freeze (void
);
Stop errors being logged. Usevips_error_thaw()
to unfreeze. You cannest freeze/thaw pairs.
voidvips_error (constchar *domain
,constchar *fmt
,...
);
Format the string in the style ofprintf()
and append to the error buffer.
See also:vips_error_system()
,vips_verror()
.
voidvips_verror (constchar *domain
,constchar *fmt
,va_list ap
);
Append a message to the error buffer.
See also:vips_error()
.
voidvips_error_system (int err
,constchar *domain
,constchar *fmt
,...
);
Format the string in the style ofprintf()
and append to the error buffer.Then create and append a localised message based on the system error code,usually the value of errno.
See also:vips_verror_system()
.
voidvips_verror_system (int err
,constchar *domain
,constchar *fmt
,va_list ap
);
Format the string in the style ofprintf()
and append to the error buffer.Then create and append a localised message based on the system error code,usually the value of errno.
See also:vips_error_system()
.
voidvips_error_g (GError **error
);
This function sets the glib error pointer from the vips error buffer andclears it. It's handy for returning errors to glib functions from vips.
Seevips_g_error()
for the inverse operation.
See also:g_set_error()
,vips_g_error()
.
voidvips_g_error (GError **error
);
This function adds theGError
to the vips error buffer and clears it. It'sthe opposite ofvips_error_g()
.
See also:vips_error_g()
.
voidvips_error_exit (constchar *fmt
,...
);
Sends a formatted error message to stderr, then sends the contents of theerror buffer, if any, then shuts down vips and terminates the program withan error code.
fmt
may beNULL
, in which case only the error buffer is printed beforeexiting.
See also:vips_error()
.
intvips_check_uncoded (constchar *domain
,VipsImage *im
);
Check that the image is not coded.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_coding (constchar *domain
,VipsImage *im
,VipsCoding coding
);
Check that the image has the requiredcoding
.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_coding_known (constchar *domain
,VipsImage *im
);
Check that the image is uncoded, LABQ coded or RAD coded.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_coding_noneorlabq (constchar *domain
,VipsImage *im
);
Check that the image is uncoded or LABQ coded.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_coding_same (constchar *domain
,VipsImage *im1
,VipsImage *im2
);
Check that the images have the same coding.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_mono (constchar *domain
,VipsImage *im
);
Check that the image has exactly one band.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_bands (constchar *domain
,VipsImage *im
,int bands
);
Check that the image hasbands
bands.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_bands_1or3 (constchar *domain
,VipsImage *im
);
Check that the image has either one or three bands.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_bands_atleast (constchar *domain
,VipsImage *im
,int bands
);
Check that the image has at leastbands
bands.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_bands_1orn (constchar *domain
,VipsImage *im1
,VipsImage *im2
);
Check that the images have the same number of bands, or that one of theimages has just 1 band.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_bands_1orn_unary (constchar *domain
,VipsImage *im
,int n
);
Check that an image has 1 orn
bands. Handy for unary operations, cf.vips_check_bands_1orn()
.If not, set an error messageand return non-zero.
See also:vips_check_bands_1orn()
.
intvips_check_bands_same (constchar *domain
,VipsImage *im1
,VipsImage *im2
);
Check that the images have the same number of bands.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_bandno (constchar *domain
,VipsImage *im
,int bandno
);
bandno
should be a valid band number (ie. 0 to im->Bands - 1), or can be-1, meaning all bands.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_int (constchar *domain
,VipsImage *im
);
Check that the image is in one of the integer formats.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_uint (constchar *domain
,VipsImage *im
);
Check that the image is in one of the unsigned integer formats.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_uintorf (constchar *domain
,VipsImage *im
);
Check that the image is unsigned int or float.Otherwise set an error message and return non-zero.
See also:vips_error()
.
intvips_check_noncomplex (constchar *domain
,VipsImage *im
);
Check that the image is not complex.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_complex (constchar *domain
,VipsImage *im
);
Check that the image is complex.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_twocomponents (constchar *domain
,VipsImage *im
);
Check that the image is has two "components", ie. is a one-band complex ora two-band non-complex.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_format (constchar *domain
,VipsImage *im
,VipsBandFormat fmt
);
Check that the image has the specified format.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_u8or16 (constchar *domain
,VipsImage *im
);
Check that the image is 8 or 16-bit unsigned integer.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_8or16 (constchar *domain
,VipsImage *im
);
Check that the image is 8 or 16-bit integer, signed or unsigned.Otherwise set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_u8or16orf (constchar *domain
,VipsImage *im
);
Check that the image is 8 or 16-bit unsigned integer, or float.Otherwise set an error message and return non-zero.
See also:vips_error()
.
intvips_check_format_same (constchar *domain
,VipsImage *im1
,VipsImage *im2
);
Check that the images have the same format.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_size_same (constchar *domain
,VipsImage *im1
,VipsImage *im2
);
Check that the images have the same size.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_oddsquare (constchar *domain
,VipsImage *im
);
Check that the image is square and that the sides are odd.If not, set an error messageand return non-zero.
See also:vips_error()
.
intvips_check_vector_length (constchar *domain
,int n
,int len
);
Check thatn
==len
.
See also:vips_error()
.
intvips_check_vector (constchar *domain
,int n
,VipsImage *im
);
Operations with a vector constant need a 1-element vector, or a vector withthe same number of elements as there are bands in the image, or a 1-bandimage and a many-element vector.
See also:vips_error()
.
intvips_check_hist (constchar *domain
,VipsImage *im
);
Histogram images must have width or height 1, and must not have more than65536 elements. Return 0 if the image will pass as a histogram, or -1 andset an error message otherwise.
See also:vips_error()
.
intvips_check_matrix (constchar *domain
,VipsImage *im
,VipsImage **out
);
Matrix images must have width and height less than 100000 and have 1 band.
Return 0 if the image will pass as a matrix, or -1 and set an errormessage otherwise.
out
is set to beim
cast to double and stored in memory. UseVIPS_MATRIX()
to address values inout
.
You must unrefout
when you are done with it.
See also:VIPS_MATRIX()
,vips_object_local()
domain | the originating domain for the error message | |
im | image to check | |
out | put image as in-memory doubles here. | [out] |
intvips_check_separable (constchar *domain
,VipsImage *im
);
Separable matrix images must have width or height 1.Return 0 if the image will pass, or -1 andset an error message otherwise.
See also:vips_error()
.
intvips_check_precision_intfloat (constchar *domain
,VipsPrecision precision
);
Check thatprec
image is either float or int.If not, set an error messageand return non-zero.
See also:vips_error()
.