So I tried to open a PGM file to display it in an ImageView widget in my JavaFX scene, but it's not working. Any idea how can I display the PGM file? Is there any way to convert it to a JPG/PNG file and then display it? thanks!
if (file != null) {
Image image1 = new Image(file.toURI().toString());
avatar.setImage(image1); //avatar is an ImageView widget in my JavaFX interface
adresse = file.getPath();
}