public JGImage getImage(String imgname) {
		if (!existsImage(imgname)) throw new JGameError(
				"Image '"+imgname+"' not defined.",true );
		JGImage img = (JGImage)images.get(imgname);
		if (img==null) {
			img = (JGImage)images_orig.get(imgname);
			if (img==null) return null;
			// convert indexed to display-compatible image
			JGColor render_bg_col = render_bg_color;
			if (render_bg_col==null) render_bg_col = bg_color;
			img = img.toDisplayCompatible(alpha_thresh,
					render_bg_col, true, make_bitmask);
			JGPoint size = img.getSize();
			//BufferedImage img2 = JREImage.createCompatibleImage(
			//		size.width,size.height, Transparency.TRANSLUCENT );
			//img2.getGraphics().drawImage(img,0,0,null);
			//img=img2;
			if (width>0 && height>0) {
				if (prescale) {
					JGPoint scaledpos = scalePos(size.x,size.y,false);
					img = img.scale(scaledpos.x,scaledpos.y);
					// convert translucent image to bitmask
					// not necessary?
					//img = imageutil.toCompatibleBitmask(img,alpha_thresh,
					//		render_bg_col,false);
				} // else skip this part for efficiency, even though scalefac
				// is 1.0.
				images.put(imgname,img);
			} else {
				throw new JGameError("Image width, height <= 0 !",true);
			}
		}
		return img;
	}