private static void putRGBAAcontig16bittile(
TiffRgbaImage img, int[] raster, int rasterOffset, int rasterShift,
int x, int y, int width, int height, byte[] buffer, int offset, int bufferShift)
{
int samplesperpixel = img.samplesperpixel;
short[] wp = Tiff.ByteArrayToShorts(buffer, offset, buffer.Length);
int wpPos = 0;
bufferShift *= samplesperpixel;
while (height-- > 0)
{
for (x = width; x-- > 0; )
{
raster[rasterOffset] = PACKW4(wp[wpPos], wp[wpPos + 1], wp[wpPos + 2], wp[wpPos + 3]);
rasterOffset++;
wpPos += samplesperpixel;
}
rasterOffset += rasterShift;
wpPos += bufferShift;
}
}