private void scaleImage() {
		setProgress("Scaling...");
		new SwingWorker<BufferedImage, Object>() {
			BufferedImage image = controller.getImageBean().getImage();
			double scale = (double)controller.getParametersBean().getResolution()/image.getWidth();
			
			@Override
			protected BufferedImage doInBackground() throws Exception {
				AffineTransform at = new AffineTransform();
				at.scale(scale, scale);
				AffineTransformOp scaleOp = 
				   new AffineTransformOp(at, AffineTransformOp.TYPE_BICUBIC);
				BufferedImage scaled = new BufferedImage((int)(image.getWidth()*scale), (int)(image.getHeight()*scale), image.getType());
				scaled = scaleOp.filter(image, scaled);
				return scaled;
			}
			
			@Override
			protected void done() {
				try {
					analyzeImage(get());
				} catch (InterruptedException e) {
					e.printStackTrace();
				} catch (ExecutionException e) {
					e.printStackTrace();
				}
			}
			
		}.execute();
	}