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

AffineTransformOp does not work properly for some of the rendering hints

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0, 1.4.2, 1.4.2_05, 6
    • client-libs
    • 2d
    • generic, x86
    • generic, linux, windows_nt, windows_2000, windows_xp

      I have written an application which constructs a buffered image and rotates it using an AffineTransformOp. It baiscally constructs buffered image of various types and filters it using AffTransformOp using all the rendering hints. For the following buffered image types, the colors in the filtered image returned by AffineTransformOp are inverted when any of the rendering hints given in this bug description are specified.
      TYPE_INT_BGR
      TYPE_USHORT_555_RGB
      TYPE_USHORT_565_RGB

      The above buffered images are not filtered properly when any of the following rendering hints are specified.
      KEY_RENDERING, VALUE_RENDER_QUALITY
      KEY_INTERPOLATION, VALUE_INTERPOLATION_BILINEAR
      KEY_INTERPOLATION, VALUE_INTERPOLATION_BICUBIC

      All the buffered image types specified above fail for all the rendering hints given above right from JDK1.4+ on Windows. Out of these, TYPE_INT_BGR fails for all these rendering hints right from JDK1.2.2 on Win32 platforms.
      On Solaris, none of these failures are reproducible.

      I have attached a sample code. Execute the sample code. Choose one of the buffered image types given above and the corresponding rendering hint specified in this bug. Click the scrollbar's block increment / unit increment. You will notice that the image gets rotated to the right and all the colors in the image are inverted (Choose interpolation / rendering from the rendering hints drop-down).

      This is not happening for other buffered image types / rendering hints.

            bae Andrew Brygin
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: