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

Need to specify behavior of out-of-range arguments for WriteableImage constructors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7u6
    • 7u6
    • javafx

      Constructing a WritableImage with a width or height <= 0 with throw an exception in the toolkit:

      java.lang.IllegalArgumentException: Image dimensions must be > 0
              at com.sun.prism.Image.<init>(Image.java:135)
              at com.sun.prism.Image.<init>(Image.java:118)
              at com.sun.prism.Image.fromByteBgraPreData(Image.java:44)
              at com.sun.javafx.tk.quantum.QuantumToolkit.createPlatformImage(QuantumToolkit.java:1312)
              at javafx.scene.image.Image.<init>(Image.java:662)
              at javafx.scene.image.WritableImage.<init>(WritableImage.java:70)

      This should be documented if this is the desired behavior (which I think it is).

            flar Jim Graham
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: