return new BitmapGraphics8bpp(rm.asMemoryResource(data), width,
height, dbOffset, bytesPerLine);
}
case DataBuffer.TYPE_SHORT: {
final short[] data = ((DataBufferShort) dataBuffer).getData();
return new BitmapGraphics16bpp(rm.asMemoryResource(data), width,
height, dbOffset * 2, bytesPerLine);
}
case DataBuffer.TYPE_USHORT: {
final short[] data = ((DataBufferUShort) dataBuffer).getData();
return new BitmapGraphics16bpp(rm.asMemoryResource(data), width,