MCPcopy Create free account
hub / github.com/defold/defold / PreMultiplyAlpha

Function PreMultiplyAlpha

engine/texc/src/texc.cpp:77–81  ·  view source on GitHub ↗

Pre-multiply the color with alpha in a texture. The texture must have format PF_R8G8B8A8 for the alpha to be pre-multiplied.

Source from the content-addressed store, hash-verified

75
76 // Pre-multiply the color with alpha in a texture. The texture must have format PF_R8G8B8A8 for the alpha to be pre-multiplied.
77 bool PreMultiplyAlpha(Image* image)
78 {
79 PreMultiplyAlpha(image->m_Data, image->m_Width, image->m_Height);
80 return true;
81 }
82
83 // Flips a texture
84 bool Flip(Image* image, FlipAxis flip_axis)

Callers 4

DoEncodeFunction · 0.50
TEST_FFunction · 0.50
TEST_PFunction · 0.50

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.40
TEST_PFunction · 0.40