The current bmp_img_read function only supports 24 bit uncompressed BMP. Some code like ``` if ((img->img_header.biBitCount != 24) || (img->img_header.biCompression != 0)){ printf("format is not 24bit uncompressed\n"); fclose (img_file); return BMP_ERROR; } ``` will be helpful to avoid errors and give user an idea about the error.