+ if (error)
+ {
+ switch (error)
+ {
+ case BMP_ERROR_SDINITFAIL:
+ break;
+ case BMP_ERROR_FILENOTFOUND:
+ break;
+ case BMP_ERROR_NOTABITMAP:
+ // First two bytes of image not 'BM'
+ break;
+ case BMP_ERROR_INVALIDBITDEPTH:
+ // Image is not 24-bits
+ break;
+ case BMP_ERROR_COMPRESSEDDATA:
+ // Image contains compressed data
+ break;
+ case BMP_ERROR_INVALIDDIMENSIONS:
+ // Width or Height is > LCD size
+ break;
+ case BMP_ERROR_PREMATUREEOF:
+ // EOF unexpectedly reached in pixel data
+ break;
+ }
+ }