Turn off using temp file in ImageIO - our images are too small to do that

This commit is contained in:
Mike Primm 2011-08-16 21:25:16 -05:00
parent e479d04c85
commit 7fd2d5bf10

View File

@ -152,6 +152,7 @@ public class FileLockManager {
byte[] rslt; byte[] rslt;
synchronized(baos_lock) { synchronized(baos_lock) {
baos.reset(); baos.reset();
ImageIO.setUseCache(false); /* Don't use file cache - too small to be worth it */
if(fmt.getFileExt().equals("jpg")) { if(fmt.getFileExt().equals("jpg")) {
WritableRaster raster = img.getRaster(); WritableRaster raster = img.getRaster();
WritableRaster newRaster = raster.createWritableChild(0, 0, img.getWidth(), WritableRaster newRaster = raster.createWritableChild(0, 0, img.getWidth(),