title: Scaling an Image in GWT
body: <p>Changing the size of an <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/Image.html" rel="noreferrer">Image</a> Widget in GWT changes the size of the image element, but does not rescale the image on the screen. Therefore, the following will not work: </p>
  
  <pre><code>Image image = new Image(myImageResource);
  image.setHeight(newHeight);
  image.setWidth(newWidth);
  image.setPixelSize(newWidth, newHeight);
  </code></pre>
  
  <p>This is because GWT implements its <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/Image.html" rel="noreferrer">Image</a> widget by setting the <code>background-image</code> of the HTML <code>&lt;img... /&gt;</code> element as the image, using CSS.</p>
  
  <p>How does one get the actual image to resize?</p>