qoi: Added support for image of channels 3 (#4384)
This commit is contained in:
parent
99ff770edc
commit
8d267aaf23
@ -506,10 +506,10 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
if (fileData != NULL)
|
||||
{
|
||||
qoi_desc desc = { 0 };
|
||||
image.data = qoi_decode(fileData, dataSize, &desc, 4);
|
||||
image.data = qoi_decode(fileData, dataSize, &desc, (int) fileData[12]);
|
||||
image.width = desc.width;
|
||||
image.height = desc.height;
|
||||
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
|
||||
image.format = desc.channels == 4 ? PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 : PIXELFORMAT_UNCOMPRESSED_R8G8B8;
|
||||
image.mipmaps = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user