Browse Source

engine: common: imagelib: fixed loading 32 bits per pixel BMP files

pull/2/head
SNMetamorph 2 years ago committed by Alibek Omarov
parent
commit
49fc6143ab
  1. 7
      engine/common/imagelib/img_bmp.c

7
engine/common/imagelib/img_bmp.c

@ -69,8 +69,11 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi @@ -69,8 +69,11 @@ qboolean Image_LoadBMP( const char *name, const byte *buffer, fs_offset_t filesi
// bogus compression? Only non-compressed supported.
if( bhdr.compression != BI_RGB )
{
Con_DPrintf( S_ERROR "Image_LoadBMP: only uncompressed BMP files supported (%s)\n", name );
return false;
if( bhdr.bitsPerPixel != 32 || bhdr.compression != BI_BITFIELDS )
{
Con_DPrintf( S_ERROR "Image_LoadBMP: only uncompressed BMP files supported (%s)\n", name );
return false;
}
}
image.width = columns = bhdr.width;

Loading…
Cancel
Save