//
// To conserve resources, we reuse an ArrayByteBuffer used during the
// reading of metadata and stored in MRWImageInfo.
//
final MRWImageInfo info = (MRWImageInfo)imageInfo.getAuxiliaryInfo();
final ArrayByteBuffer buf = info.getTIFFBlock();
//
// Patch the JPEG preview image.
//
if ( buf.get( offset + 1 ) == JPEG_SOI_MARKER &&
buf.get( offset + 2 ) == JPEG_MARKER_BYTE )
buf.put( offset, JPEG_MARKER_BYTE );
//
// Finally, we can call createWritableRasterFrom(), but on the patched
// buffer.
//
return JPEGImageType.getImageFromBuffer(