Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8096579

[Stage, Windows] Bad rendering of Icons

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u40
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7 64 bits

      Description

      Run this sample code :


      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.image.Image;
      import javafx.scene.image.ImageView;
      import javafx.stage.Stage;

      /*
       * To change this license header, choose License Headers in Project Properties.
       * To change this template file, choose Tools | Templates
       * and open the template in the editor.
       */
      /**
       *
       * @author samir.hadzic
       */
      public class HelloIcon extends Application {
        
          public static void main(String[] args) {
              Application.launch(args);
          }
          
           @Override public void start(Stage stage) {
              Image iconImage16 = new Image(getClass().getResourceAsStream("notification-check-16.png"));
              Image iconImage32 = new Image(getClass().getResourceAsStream("notification-check-32.png"));
              Image iconImage48 = new Image(getClass().getResourceAsStream("notification-check.png"));
              
              stage.getIcons().addAll(iconImage16, iconImage32, iconImage48);
              
              Scene scene = new Scene(new Group(new ImageView(iconImage32)));
              stage.setScene(scene);
              stage.show();
          }
          
      }

      You will need the three PNG images next to your application (16x16,32x32,48x48) :
      http://imgur.com/q5sVoS0
      http://imgur.com/dFaNbRA
      http://imgur.com/JndXEJO

      Once you ran the sample, you will see that the Image is well rendered in the ImageView, but it is ugly in the Windows bar (on windows 7). See here:
      http://imgur.com/iFWTmMP

      I don't know why it's doing that. Giving a bigger size of Image is not doing anything. It's not the case for all the images, but I know that my company icon is displayed ugly both in the Windows bar and in the little icon on the upper left side of my window.

      If you have a temporary work-around, or a documentation that's proving I'm doing wrong, I'll gladly take it.
      tested with JDK 8u40 b09

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vadim Vadim Pakhnushev
                Reporter:
                shadzic Samir Hadzic
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: