MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / IsSupportedBMPFormat

Function IsSupportedBMPFormat

common/Image.cpp:770–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768#pragma pack(pop)
769
770bool IsSupportedBMPFormat(u32 compression, u16 bit_count)
771{
772 if (compression == 0)
773 return (bit_count == 1 || bit_count == 4 || bit_count == 8 || bit_count == 16 || bit_count == 24 || bit_count == 32);
774
775 if (compression == 1)
776 return (bit_count == 8);
777
778 if (compression == 2)
779 return (bit_count == 4);
780
781 if (compression == 3 || compression == 4) // BMP_BITFIELDS or BMP_ALPHABITFIELDS
782 return (bit_count == 16 || bit_count == 32);
783
784 return false;
785}
786
787bool LoadBMPPalette(std::vector<u32>& palette, const u8* data, u32 palette_offset, const BMPInfoHeader& info_header)
788{

Callers 1

BMPBufferLoaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected