Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alpha Compositing and shyts
#5
Uh, if you're trying to alpha-compose using over:

Code:
double alpha1 = a1/255.,
           alpha2 = a2/255. * (1 - alpha1);
    newImage[offset + j*4 + 3] = (byte)(a1 * alpha1 + a2 * alpha2);
    newImage[offset + j*4] = (byte)(r1 * alpha1 + r2 * alpha2);
    newImage[offset + j*4 + 1] = (byte)(g1 * alpha1 + g2 * alpha2);
    newImage[offset + j*4 + 2] = (byte)(b1 * alpha1 + b2 * alpha2);
Reply


Messages In This Thread
Alpha Compositing and shyts - by KajitiSouls - 2009-12-11, 12:15 AM
Alpha Compositing and shyts - by Nikkey - 2009-12-11, 05:08 AM
Alpha Compositing and shyts - by Stereo - 2009-12-11, 10:07 AM
Alpha Compositing and shyts - by KajitiSouls - 2009-12-11, 04:08 PM
Alpha Compositing and shyts - by Nikkey - 2009-12-11, 05:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)