Scalable images in Java

Posted by CodeGuy on Stack Overflow See other posts from Stack Overflow or by CodeGuy
Published on 2012-09-18T21:35:44Z Indexed on 2012/09/18 21:37 UTC
Read the original article Hit count: 151

Filed under:
|
|

I anticipate using some images in my Java application. These images will be drawn onto my JPanel using g.drawImage(). The JPanel is resizable and the images should scale as the JPanel increases/decreases in size

Two questions:

  1. What image format is best for this type of desired scalable image? For instance, in this application, an image of size 100x100 may be scaled into an image of size 30x30 or 10x10 or 300x300.
  2. How can I write code to do this scaling?

© Stack Overflow or respective owner

Related posts about java

Related posts about jpanel