Ticket #2752: wmsmem.diff
| File wmsmem.diff, 1.1 KB (added by , 17 years ago) |
|---|
-
src/wmsplugin/GeorefImage.java
87 87 } 88 88 89 89 boolean alphaChannel = Main.pref.getBoolean("wmsplugin.alpha_channel"); 90 int maxres = Main.pref.getInteger("wmsplugin.reimg_res",1000); 90 91 // We don't need this, as simply saving the image to RGB instead of ARGB removes alpha 91 92 // But we do get a black instead of white background. 92 93 //Image ppImg = image; … … 106 107 // Storing images this large in memory will certainly hang up JOSM. Luckily 107 108 // traditional rendering is as fast at these zoom levels, so it's no loss. 108 109 // Also prevent caching if we're out of memory soon 109 if(width > 10000 || height > 10000|| width*height*3 > freeMem) {110 if(width > maxres || height > maxres || width*height*3 > freeMem) { 110 111 fallbackDraw(g, image, minPt, maxPt); 111 112 } else { 112 113 // We haven't got a saved resized copy, so resize and cache it
