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

multiresolution image: some questions about selecting the proper image variant

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Other
    • Icon: P4 P4
    • 9
    • 9
    • client-libs

      Sorry, not sure if these are bugs, as all the below cases break the documented condition that the initial array of the buffered images is sorted, i.e. (width(image_1) < width(image_2) < ...) && (height(image_1) < height(image_2) < ...), but just in case:

      JDK9 b101 + Ubuntu Linux 14.04

      1. Please run the attached test using GDK_SCALE=2. The red "20x" image will be displayed (expected: "2x").

      2. Please remove "generateImage( 2, Color.GRAY)" from the code and run again with GDK_SCALE=2. The "20x" image will be shown again. But 1x is closer to 2x than to 20x.

      3. Please swap "20x" and "1x" in the constructor of IMG => 1x one is displayed (when scale = 2).

      4. two images of the same size
      IMG =
              new BaseMultiResolutionImage(new BufferedImage[]{
              generateImage(1, Color.BLACK),
              generateImage(1, Color.RED)});
      the 2nd (red) image is displayed.
        
      5. this one looks quite buggy. Please run the attached "MultiRes2" test. IMG3 is correctly detected as the resolution variant, the image color is GREEN (as expected), but its width is W/2, as for IMG1 (NOK!)
         
      Then please rearrange the images from the previous example in the following order: {IMG2, IMG1, IMG3}. then the image's height will be H/2 (NOK) and the color is green (OK).
         
      The latter issue is also reproducible on Windows 8

            alexsch Alexandr Scherbatiy
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: