MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / PNG_getBpp

Function PNG_getBpp

Protocols/AppleImageCodec/picopng.c:781–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781UINT32 PNG_getBpp(const PNG_INFO *info)
782{
783 UINT32 bitDepth, colorType;
784 bitDepth = info->bitDepth;
785 colorType = info->colorType;
786 if (colorType == 2)
787 return (3 * bitDepth);
788 else if (colorType >= 4)
789 return (colorType - 2) * bitDepth;
790 else
791 return bitDepth;
792}
793
794void PNG_readPngHeader(PNG_INFO *info, const UINT8 *in, UINT32 inlength)
795{ // read the information from the header and store it in the Info

Callers 1

PNG_decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected