JavaFX- Don't scale image for stage icon?

198 views Asked by At

I am setting an image to my Stage so that becomes the logo for the JavaFX application.

stage.getIcons().add(new Image("myLogo.png"));

However, the image gets scaled and stretched horizontally since it is not at a ratio it likes.

Is there a way can manipulate the image so it is centered in its placement, or add margins so it matches the expected ratio?

I don't want to create a whole new image if I can help it.

0

There are 0 answers