private void writeChunkiTXt(OutputStream os, PngText.iTXt text)
throws IOException, ImageWriteException
{
if (!UnicodeUtils.isValidISO_8859_1(text.keyword))
throw new ImageWriteException(
"Png tEXt chunk keyword is not ISO-8859-1: " + text.keyword);
if (!UnicodeUtils.isValidISO_8859_1(text.languageTag))
throw new ImageWriteException(
"Png tEXt chunk language tag is not ISO-8859-1: "
+ text.languageTag);
ByteArrayOutputStream baos = new ByteArrayOutputStream();