directory.setByteArray(tagType, tagBytes);
// TODO allow rebasing the reader with a new zero-point, rather than copying data here
if (tagType == PhotoshopDirectory.TAG_IPTC)
new IptcReader().extract(new SequentialByteArrayReader(tagBytes), metadata, tagBytes.length);
if (tagType >= 0x0fa0 && tagType <= 0x1387)
PhotoshopDirectory._tagNameMap.put(tagType, String.format("Plug-in %d Data", tagType - 0x0fa0 + 1));
} catch (IOException ex) {
directory.addError(ex.getMessage());