// XXX - this makes a copy, which is memory-inefficient
srcRas = rimage.getData();
in JPEGImageWriter is really lame. If the source is a BufferedImage it is
going to copy the entire thing in memory. If it is an untiled JAI image this
should not happen (a child of the tile would be returned instead of copying).
Nonetheless I would suggest changing this to the code listed below. If a more
minor change would get in to the next build sooner then I would suggest this
srcRas = rimage instanceof BufferedImage ?
srcRas = ((BufferedImage)rimage).getRaster() :
which should solve most of the problem.
###@###.### 2005-05-06 20:43:42 GMT