MCPcopy Create free account
hub / github.com/Tencent/libpag / ImageHasAlpha

Function ImageHasAlpha

exporter/src/utils/ImageData.cpp:224–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224bool ImageHasAlpha(uint8_t* data, int stride, int width, int height) {
225
226 uint8_t sum = 0xFF;
227
228 for (int j = 0; j < height; j++) {
229 for (int i = 0; i < width; i++) {
230 sum &= data[(i << 2) + 3];
231 }
232
233 if (sum != 0xFF) {
234 return true;
235 }
236
237 data += stride;
238 }
239
240 return false;
241}
242
243void OddPaddingRGBA(uint8_t* inData, int inDataStride, int width, int height) {
244 int widthAdd = 0;

Callers 1

GetVideoSequenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected