2.5. Define degli Errori

Quando un'immagine viene salvata o aperta si possono verificare degli errori che Imel segnala sotto forma di codice oppure utilizzando un tipo chiamato ImelError che vedremo dopo.

Č possibile che l'errore ritornato non corrisponda agli errori personalizzati di Imel che verranno mostrati, ciņ puņ succedere a causa della variabile errno che viene utilizzata nel caso alcune funzioni della libreria standard falliscano l'esecuzione.

2.5.1. Errori di Caricamento

Ognuno di questi errori ha dopo il nome il suo codice, e nel commento il messaggio che viene salvato nel campo description della variabile d'errore ( se passata ).

Di seguito la tabella con il nome del define, il codice e il testo del campo description.

Tabella 2-1. Errori di Caricamento

Nome ErroreCodice ErroreTesto campo description
IMEL_ERR_LOAD0x0aError while loading the image
IMEL_ERR_JPEG_LOAD0x60Error while loading the jpeg image
IMEL_ERR_PNG_LOAD0x61Error while loading the png image
IMEL_ERR_TIFF_LOAD0x62Error while loading the tiff image
IMEL_ERR_BMP_LOAD0x63Error while loading the bmp image
IMEL_ERR_DDS_LOAD0x64Error while loading the dds image
IMEL_ERR_FAXG3_LOAD0x65Error while loading the faxg3 image
IMEL_ERR_CUT_LOAD0x66Error while loading the cut image
IMEL_ERR_XPM_LOAD0x67Error while loading the xpm image
IMEL_ERR_XBM_LOAD0x68Error while loading the xbmp image
IMEL_ERR_SGI_LOAD0x69Error while loading the sgi image
IMEL_ERR_WBMP_LOAD0x70Error while loading the wbmp image
IMEL_ERR_HDR_LOAD0x71Error while loading the hdr image
IMEL_ERR_PSD_LOAD0x72Error while loading the psd image
IMEL_ERR_IFF_LOAD0x73Error while loading the iff image
IMEL_ERR_JNG_LOAD0x74Error while loading the jng image
IMEL_ERR_KOALA_LOAD0x75Error while loading the koala image
IMEL_ERR_MNG_LOAD0x76Error while loading the mng image
IMEL_ERR_PCX_LOAD0x77Error while loading the pcx image
IMEL_ERR_PGM_LOAD0x78Error while loading the pgm image
IMEL_ERR_PGMRAW_LOAD0x79Error while loading the pgmraw image
IMEL_ERR_RAS_LOAD0x80Error while loading the ras image
IMEL_ERR_EXR_LOAD0x81Error while loading the exr image
IMEL_ERR_J2K_LOAD0x82Error while loading the j2k image
IMEL_ERR_PPM_LOAD0x83Error while loading the ppm image
IMEL_ERR_PPMRAW_LOAD0x84Error while loading the ppmraw image
IMEL_ERR_TARGA_LOAD0x87Error while loading the targa image
IMEL_ERR_JP2_LOAD0x88Error while loading the jp2 image
IMEL_ERR_ICO_LOAD0x89Error while loading the ico image
IMEL_ERR_PCD_LOAD0x90Error while loading the pcd image
IMEL_ERR_GIF_LOAD0x91Error while loading the gif image

2.5.2. Errori di Salvataggio

La tabella che segue č organizzata nello stesso modo di quella illustrata precedentemente.

Tabella 2-2. Errori di Salvataggio

Nome ErroreCodice ErroreTesto campo description
IMEL_ERR_PNG_WRITE_STRUCT0x10Could not create a PNG write structure (out of memory?)
IMEL_ERR_PNG_INFO_STRUCT0x11Could not create PNG info structure (out of memory?)
IMEL_ERR_PNG_SET_JMP0x12Could not set PNG jump value
IMEL_ERR_RAW_BPP0x52The bpp are too big for Imel
IMEL_ERR_RAW_LENGTH0x53The bpp aren't multiples of 8
IMEL_ERR_RAW_FILE_LENGTH0x54The file length isn't valid.
IMEL_ERR_RAW_BPP20x55The bpp aren't valid.