MCPcopy Create free account
hub / github.com/ddnet/ddnet / ImageFormatFromChannelCount

Function ImageFormatFromChannelCount

src/engine/gfx/image_loader.cpp:69–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static CImageInfo::EImageFormat ImageFormatFromChannelCount(int ColorChannelCount)
70{
71 switch(ColorChannelCount)
72 {
73 case 1:
74 return CImageInfo::FORMAT_R;
75 case 2:
76 return CImageInfo::FORMAT_RA;
77 case 3:
78 return CImageInfo::FORMAT_RGB;
79 case 4:
80 return CImageInfo::FORMAT_RGBA;
81 default:
82 dbg_assert_failed("ColorChannelCount invalid");
83 }
84}
85
86static int PngliteIncompatibility(png_structp pPngStruct, png_infop pPngInfo)
87{

Callers 1

LoadPngMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected