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

This commit is contained in:
Mike Primm 2011-08-17 10:25:16 +08:00 committed by mikeprimm
parent 55dc6397e1
commit ae9d1fde90

View File

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