case DataBuffer.TYPE_INT:
size += (dataBitOffset + 31) / 32;
break;
}
} else if (sampleModel instanceof SinglePixelPackedSampleModel) {
SinglePixelPackedSampleModel sppsm =
(SinglePixelPackedSampleModel) sampleModel;
int scanlineStride = sppsm.getScanlineStride();
size = (h - 1) * scanlineStride + w;
}
if (dataBuffer.getSize() < size) {
// awt.298=dataBuffer is too small
throw new RasterFormatException(Messages.getString("awt.298")); //$NON-NLS-1$