title: Java SWT Image Resize Not Working
body: <p>I am trying to resize a picture and save it however the picture I am saving is not resized.</p>
  
  <p>Here is the code I am trying use.</p>
  
  <pre><code>if(CC_Files.fileExists(path)){
                  if(path.contains(".jpg") || path.contains(".png") || path.contains(".gif") ){
                  Image image = (Image) SWTResourceManager
                          .getImage(path);
                  ImageData imgData = image.getImageData();
                  imgData.scaledTo(150, 150);
                  ImageLoader imageLoader = new ImageLoader();
                  imageLoader.data = new ImageData[] {imgData};
                  imageLoader.save(Variables.getStrResources() + "\\Pics\\" + a.getHerd_id() + ".jpg",SWT.IMAGE_JPEG);
      }      
  }
  </code></pre>