// We have to redo a lot of what createWritableRasterFrom() does here
// so we can get a hold of the buffer and change the fist byte back to
// FF. Because we have to modify it, it can't be a FileByteBuffer, so
// we have to copy it into an ArrayByteBuffer.
//
final ImageMetaValue offsetValue =
dir.getValue( MINOLTA_PREVIEW_IMAGE_START );
final ImageMetaValue lengthValue =
dir.getValue( MINOLTA_PREVIEW_IMAGE_LENGTH );
if ( offsetValue == null || lengthValue == null )
return null;
final int offset = offsetValue.getIntValue();
final int length = lengthValue.getIntValue();
if ( offset <= 0 || length <= 0 )
return null;
//
// To conserve resources, we reuse an ArrayByteBuffer used during the
// reading of metadata and stored in MRWImageInfo.