As tested:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
StackPane root = new StackPane();
Image image = new Image("pixelart.png", 400, 400, true, false);
ImageView view = new ImageView(image);
root.getChildren().add(view);
Scene scene = new Scene(root, 450, 450);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}