Extract descriptor information about image instance.
ImageDescriptor d = new ImageDescriptor();
try {
d.width = rawData[valueIndex++] & 0xff;
d.height = rawData[valueIndex++] & 0xff;
d.codingScheme = rawData[valueIndex++] & 0xff;
// parse image id
d.imageId = (rawData[valueIndex++] & 0xff) << 8;
d.imageId |= rawData[valueIndex++] & 0xff;
// parse offset
d.highOffset = (rawData[valueIndex++] & 0xff); // high byte offset
d.lowOffset = rawData[valueIndex++] & 0xff; // low byte offset
d.length = ((rawData[valueIndex++] & 0xff) << 8 | (rawData[valueIndex++] & 0xff));
} catch (IndexOutOfBoundsException e) {
StkLog.d("ImageDescripter", "parse; failed parsing image descriptor");
d = null;
}
return d;