Created
March 12, 2019 17:25
-
-
Save ProTip/fdc31e85bfac7416fdb01dc25dd7ba4d to your computer and use it in GitHub Desktop.
Mask position conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(int w = 0; w < width; w++) { | |
for(int h = 0; h < height; h++) { | |
maskPos = w * height + h; | |
colorPos = h * width + w; | |
colorMask[colorPos] = mask[maskPos]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment