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

Function ClearTransparentPixels

src/tools/map_optimize.cpp:15–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include <vector>
14
15static void ClearTransparentPixels(uint8_t *pImg, int Width, int Height)
16{
17 for(int y = 0; y < Height; ++y)
18 {
19 for(int x = 0; x < Width; ++x)
20 {
21 int Index = y * Width * 4 + x * 4;
22 if(pImg[Index + 3] == 0)
23 {
24 pImg[Index + 0] = 0;
25 pImg[Index + 1] = 0;
26 pImg[Index + 2] = 0;
27 }
28 }
29 }
30}
31
32static void CopyOpaquePixels(uint8_t *pDestImg, uint8_t *pSrcImg, int Width, int Height)
33{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected