0

I want to be able to resize my icons so that I can change the aspect ratio. I have the image of a rectangle and I want to be able to stretch it to any size, but when I resize it, it fills the empty space with padding instead of stretching it.

I used SVGIcon to create the icon but it keeps the aspect ratio when resized. I also have a .png of the rectangle.

How do I resize an icon without keeping the aspect ratio?

  • Possible duplicate of [resizing image in java](http://stackoverflow.com/questions/5895829/resizing-image-in-java) – pczeus Feb 15 '16 at 22:53
  • @pczeus `getScaledInstance` wouldn't be my first choice - FYI [The Perils of Image.getScaledInstance()](https://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html) – MadProgrammer Feb 15 '16 at 22:54
  • Maybe have a look at [imgscalr](https://github.com/thebuzzmedia/imgscalr) – MadProgrammer Feb 15 '16 at 22:57

0 Answers0