DRPixelmapHasZeros matching

This commit is contained in:
Dethrace Labs 2026-01-24 07:52:01 +13:00
parent 7a45b264ab
commit ac823d8ab8
1 changed files with 4 additions and 4 deletions

View File

@ -1998,20 +1998,20 @@ int DRPixelmapHasZeros(br_pixelmap* pm) {
int y;
char* row_ptr;
char* pp;
int i;
if (pm->flags & BR_PMF_NO_ACCESS) {
return 1;
}
row_ptr = (char*)pm->pixels + (pm->row_bytes * pm->base_y) + pm->base_x;
row_ptr = pm->pixels;
row_ptr += (pm->row_bytes * pm->base_y) + pm->base_x;
for (y = 0; y < pm->height; y++) {
pp = row_ptr;
for (x = 0; x < pm->width; x++) {
for (x = 0; x < pm->width; x++, pp++) {
// found a zero (transparent) pixel?
if (*pp == 0)
return 1;
pp++;
}
row_ptr += pm->row_bytes;
}