Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void unpremultiply(Uint8 & value, const unsigned div) {
- unsigned temp = value * div / 256;
- value = std::min<int>(255, temp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement