MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / ExpandRGB

Function ExpandRGB

src/Bitmap.c:358–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358static BitmapCol ExpandRGB(cc_uint8 bitsPerSample, int r, int g, int b) {
359 switch (bitsPerSample) {
360 case 1:
361 r *= 255; g *= 255; b *= 255; break;
362 case 2:
363 r *= 85; g *= 85; b *= 85; break;
364 case 4:
365 r *= 17; g *= 17; b *= 17; break;
366 }
367 return BitmapCol_Make(r, g, b, 0);
368}
369
370cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) {
371 cc_uint8 tmp[64];

Callers 1

Png_DecodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected