private static void putcontig8bitCIELab(
TiffRgbaImage img, int[] raster, int rasterOffset, int rasterShift,
int x, int y, int width, int height, byte[] buffer, int offset, int bufferShift)
{
bufferShift *= 3;
while (height-- > 0)
{
for (x = width; x-- > 0; )
{
float X, Y, Z;
img.cielab.CIELabToXYZ(buffer[offset], (sbyte)buffer[offset + 1], (sbyte)buffer[offset + 2], out X, out Y, out Z);
int r, g, b;
img.cielab.XYZToRGB(X, Y, Z, out r, out g, out b);
raster[rasterOffset] = PACK(r, g, b);
rasterOffset++;
offset += 3;
}
rasterOffset += rasterShift;
offset += bufferShift;
}
}