All pastes #2128473 Raw Edit

Something

public text v1 · immutable
#2128473 ·published 2012-03-15 21:24 UTC
rendered paste body
1.
         c = *src++;
         a = (c >> 24) & 0xff;
         c = (a << 24) | ((((c >> 16) & 0xff) * a / 255) << 16) | ((((c >> 8) & 0xff) * a / 255) << 8) | ((c & 0xff) * a / 255);
         *dst++ = c;

2.
         b = *src++;
         g = *src++;
         r = *src++;
         a = *src++;
         r = r * a / 255;
         g = g * a / 255;
         b = b * a / 255;
         *dst++ = r;
         *dst++ = g;
         *dst++ = b;
         *dst++ = a;