public void setResolution(int w, int h){
		if (w==0 || h ==0){
			rawImage = null;
			image = null;
		}
		//Create buffered image
		if (w!= getWidth() || h!= getHeight()){
			image = new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
		}
		//create corresponding raw data
		int scale = colorizer.getDownscale();
		if (    rawImage == null ||
				rawImage.getWidth()!=w*scale ||
				rawImage.getHeight() != h*scale){
			rawImage = new FloatMatrix(w*scale, h*scale);
		}
		//done.
	}