Ejemplo n.º 1
0
        protected override void EncodeBlock(ARGBPixel *sPtr, VoidPtr blockAddr, int width)
        {
            I4Pixel *dPtr = (I4Pixel *)blockAddr;

            for (int y = 0; y < BlockHeight; y++, sPtr += width)
            {
                for (int x = 0; x < BlockWidth;)
                {
                    (*dPtr)[0]   = sPtr[x++];
                    (*dPtr++)[1] = sPtr[x++];
                }
            }
        }
Ejemplo n.º 2
0
        protected override void DecodeBlock(VoidPtr blockAddr, ARGBPixel *dPtr, int width)
        {
            I4Pixel *sPtr = (I4Pixel *)blockAddr;

            //RGBPixel* dPtr = (RGBPixel*)destAddr;
            for (int y = 0; y < BlockHeight; y++, dPtr += width)
            {
                for (int x = 0; x < BlockWidth;)
                {
                    dPtr[x++] = (*sPtr)[0];
                    dPtr[x++] = (*sPtr++)[1];
                }
            }
        }