xmp.append(" </rdf:Description>\n");
xmp.append(" </rdf:RDF>");
ITXT iTXt = new ITXT("XML:com.adobe.xmp", xmp.toString());
writer.writeChunk(iTXt);
}
writer.writeChunk(new IEND());
writer.close();
} catch (IOException e) {
logger.warn("Failed to write PNG file: " + e.getMessage(), e);
}