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

java.awt.Graphics.drawImage(Image, int, int, ImageObserver) cannot scale large

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      generic

      Description

      Customer is trying to display a large 2660 x 3575 pixels gif image using drawImage() which fails.

      We were able to test two versions of my image viewer Java test program, using the JRE v1.1.4 (the source code and class files for both programs are attached).
      The first version of the program uses java.awt.Graphics.drawImage(Image, int, int, ImageObserver), which draws, but does not scale, an image. The second version of the program uses java.awt.Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver), which draws and scales an image.

      The results: the first version was able to draw the very large image ("GardenCity.gif" - 2660 x 3575 pixels), or at least as much as would fit into the display; the second version was not able to draw the same image. Both versions could draw the smaller images.

      Customer tried JDK 1.1.2, 1.1.3, 1.1.4 all of them fail.
      See source code attached, I was able to reproduce the problem, the larges image GardenCity.gif does not get as big as expected.

        Attachments

          Activity

            People

            Assignee:
            mbronsonsunw Mike Bronson (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: