BMP image fails to load when a specific size is requested

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8u60
    • Affects Version/s: 8u45
    • Component/s: javafx
    • None
    • Environment:

      Windows 7 x64

      The following works fine, displaying the image as it should:


      Image img = new Image("file:x.bmp");

      System.out.println(img.getHeight()); //Actual image height

      StackPane sp = new StackPane();
      sp.getChildren().add(new ImageView(img));
      primaryStage.setScene(new Scene(sp));
      primaryStage.show();


      However, if the image constructor is changed to request a resized image instead:

      Image img = new Image("file:x.bmp", 200, 200, false, false);

      System.out.println(img.getHeight()); //0

      StackPane sp = new StackPane();
      sp.getChildren().add(new ImageView(img));
      primaryStage.setScene(new Scene(sp));
      primaryStage.show();

      ...the image fails to load at all.

      The following bug appears to occur with all BMP files (tried 8 and 24 bit), but the correct behaviour occurs for GIF, PNG and JPG files.

            Assignee:
            Vadim Pakhnushev
            Reporter:
            Michael Berry (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: