ImageIoUtil.WriteImage brings an I/O error exception when trying to write a tiff file. Debugging shows that the cause is "Bits per sample must be 1 for RLE compression!". This means that the compression used (the first one of the following list, returned by writerParams.getCompressionTypes() ) is only allowed for bitonal images.
After correcting this, the next problem was that tiff images didn't have the proper resolutions. I added that too. Yes it uses the com.sun.* classes; however there is no other way. Even apache xmlgraphics uses them, although in a very different way than I do
writeImage() has a parameter "int imageType" which is never used. Why?