// this can reduce size, but can also break badly written decoders
iwpjpeg.setOptimizeHuffmanTables(true);
}
writer.setOutput(fios = new FileImageOutputStream(file));
writer.write(null, new IIOImage(bi, null, null), iwp);
writer.dispose();
flag = true;
}
}
catch(IOException ex)
{