int sx = channel.getxSampling();
int sy = channel.getySampling();
if ((y % sy) == 0) {
int numElem = 1 + (w - 1) / sx;
PixelType pt = channel.getPixelType();
switch (pt) {
case UINT:
{
IntBuffer chBuf = (IntBuffer) getChannelBuffer(name);
chBuf.position(((y - ymin) / sy) * numElem);
chBuf.put((IntBuffer) inBuf.asIntBuffer().limit(numElem));
break;
}
case HALF:
{
ShortBuffer chBuf = (ShortBuffer) getChannelBuffer(name);
chBuf.position(((y - ymin) / sy) * numElem);
chBuf.put((ShortBuffer) inBuf.asShortBuffer().limit(numElem));
break;
}
case FLOAT:
{
FloatBuffer chBuf = (FloatBuffer) getChannelBuffer(name);
chBuf.position(((y - ymin) / sy) * numElem);
chBuf.put((FloatBuffer) inBuf.asFloatBuffer().limit(numElem));
break;
}
} // switch (channel.getPixelType())
inBuf.position(inBuf.position() + numElem * pt.getSampleSize());
} // if ((y % sy) == 0)
} // for (c)
} // for (y)
} // for (i)
} // if (tiled)