Currently I want to display an image on an application. It is a 16x16 .png, however I do NOT want it smoothed. I would like it to keep its sharp squares and pixels, so I tried setting the smooth parameter via
public class MainMenu implements Initializable {
@FXML ImageView imageViewOfImage;
@FXML Label labelOfImageName;
@Override
public void initialize(URL location, ResourceBundle resources) {
imageViewOfImage.setImage(new Image("images/grass_side.png", 100, 100, true, false));
imageViewOfImage.setFitWidth(1024);
imageViewOfImage.setFitHeight(1024);
labelOfImageName.setText("grass_side.png");
}
}
However, the image is still blurred. I tried moving the ImageView#setImage() below setting the size to see if that helped, however it still did nothing. I took a peek here, however I seem to be properly following the steps.
It looks much nicer when its around 300x300 pixels, but then it's smoothed out.