mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: common: imagelib: img_png.c: set IMAGE_HAS_ALPHA flag only for RGBA images.
This commit is contained in:
parent
e96271a8a9
commit
e69956c9ea
@ -232,7 +232,11 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
|
||||
image.width = png_hdr.ihdr_chunk.width;
|
||||
image.height = png_hdr.ihdr_chunk.height;
|
||||
image.size = image.height * image.width * 4;
|
||||
image.flags |= IMAGE_HAS_ALPHA | IMAGE_HAS_COLOR;
|
||||
image.flags |= IMAGE_HAS_COLOR;
|
||||
|
||||
if( png_hdr.ihdr_chunk.colortype == PNG_CT_RGBA )
|
||||
image.flags |= IMAGE_HAS_ALPHA;
|
||||
|
||||
image.depth = 1;
|
||||
|
||||
rowsize = pixel_size * image.width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user