Disable IOImage cache use for image loads
This commit is contained in:
parent
3b2b81f774
commit
d91f89baa2
1 changed files with 3 additions and 0 deletions
|
|
@ -369,6 +369,7 @@ public class TexturePack {
|
||||||
private void loadTerrainPNG(InputStream is) throws IOException {
|
private void loadTerrainPNG(InputStream is) throws IOException {
|
||||||
int i, j;
|
int i, j;
|
||||||
/* Load image */
|
/* Load image */
|
||||||
|
ImageIO.setUseCache(false);
|
||||||
BufferedImage img = ImageIO.read(is);
|
BufferedImage img = ImageIO.read(is);
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
if(img == null) { throw new FileNotFoundException(); }
|
||||||
terrain_width = img.getWidth();
|
terrain_width = img.getWidth();
|
||||||
|
|
@ -429,6 +430,7 @@ public class TexturePack {
|
||||||
/* Load image into image array */
|
/* Load image into image array */
|
||||||
private void loadImage(InputStream is, int idx) throws IOException {
|
private void loadImage(InputStream is, int idx) throws IOException {
|
||||||
/* Load image */
|
/* Load image */
|
||||||
|
ImageIO.setUseCache(false);
|
||||||
BufferedImage img = ImageIO.read(is);
|
BufferedImage img = ImageIO.read(is);
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
if(img == null) { throw new FileNotFoundException(); }
|
||||||
imgs[idx] = new LoadedImage();
|
imgs[idx] = new LoadedImage();
|
||||||
|
|
@ -642,6 +644,7 @@ public class TexturePack {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BufferedImage img = DynmapBufferedImage.createBufferedImage(outbuf, terrain_width, terrain_height);
|
BufferedImage img = DynmapBufferedImage.createBufferedImage(outbuf, terrain_width, terrain_height);
|
||||||
|
ImageIO.setUseCache(false);
|
||||||
ImageIO.write(img, "png", f);
|
ImageIO.write(img, "png", f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue