protected override void EncodeBlock(ARGBPixel *sPtr, VoidPtr blockAddr, int width) { IA4Pixel *dPtr = (IA4Pixel *)blockAddr; for (int y = 0; y < BlockHeight; y++, sPtr += width) { for (int x = 0; x < BlockWidth;) { *dPtr++ = sPtr[x++]; } } }
protected override void DecodeBlock(VoidPtr blockAddr, ARGBPixel *dPtr, int width) { IA4Pixel *sPtr = (IA4Pixel *)blockAddr; //ARGBPixel* dPtr = (ARGBPixel*)destAddr; for (int y = 0; y < BlockHeight; y++, dPtr += width) { for (int x = 0; x < BlockWidth;) { dPtr[x++] = *sPtr++; } } }