mi_img_create,
mi_img_open,
mi_img_close,
mi_img_read, and mi_img_write return
miFALSE if an error occurred, or miTRUE if the
call succeeded. mi_img_alloc returns 0 if there is no
memory, and a nonzero pointer otherwise. mi_img_err_msg
returns nothing. All others return values, there are no errors.
There is a global variable img_debug that can be set to
values 0…3 for automatic printing of
diagnostics, and a routine
mi_img_debug that sets
this variable:
| 0 | no automatic diagnostics |
| 1 | diagnostics for create, open, and close |
| 2 | same as 1, also prints file format and size |
| 3 | same as 2, also reports scanline r/w problems |
img_debug is initialized to 0. All messages are printed using the mi_debug printing routine. The library contains sanity checks that prevent operations on invalid miImg_file structs that have not been opened, or have been opened twice.
The mi_img_err_msg function prints an error message for the argument miImg_file structure, if an error occurred. The error is printed using mi_error.
Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.