BitMiracle.Tiff2Pdf.T2P.sample_rgbaa_to_rgb C# (CSharp) Method

sample_rgbaa_to_rgb() private static method

This functions converts in place a buffer of RGBA interleaved data into RGB interleaved data, discarding A.
private static sample_rgbaa_to_rgb ( byte data, int samplecount ) : int
data byte
samplecount int
return int
        private static int sample_rgbaa_to_rgb(byte[] data, int samplecount)
        {
            int i = 0;
            for ( ; i < samplecount; i++)
                Buffer.BlockCopy(data, i * 4, data, i * 3, 3);

            return (i * 3);
        }