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

Graphics2D.drawRenderedImage does not correctly display a cropped image.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • client-libs
    • None
    • 2d
    • beta2
    • sparc
    • solaris_7

      After an image has been cropped using the JAI "crop" operator, using Graphics2D.drawRenderedImage does not correctly display the image, the entire image is displayed instead of just the cropped region. The image displays correctly if JAI's ScrollingImagePanel is used to display the image.

      Note that when the region to be cropped starts at (0,0), Graphics2D.drawRenderedImage does not correctly display the image, displaying the entire image instead of just the cropped region. However using a different starting location like (1,1) does not cause the same problem, now the cropped image displays correctly.

      A test case "CropTest" demostrating this problem is attached. To run the program, set CLASSPATH to /net/luxury/export1/java/jdks/jai-1_1/lib/jai_core.jar:/net/luxury/export1/java/jdks/jai-1_1/lib/jai_codec.jar:/net/luxury/export1/java/jdks/jai-1_1/lib/mlibwrapper_jai.jar
                  
      set LD_LIBRARY_PATH to .:/net/luxury/export1/java/jdks/jai-1_1/lib/

      and run CropTest

            jrevans Jerald Evans (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: