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

Allow enabling of background loading for images loaded from an InputStream

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • javafx
    • None

      JavaFX allows images to load in the background or not when providing a URL as string, but not when providing an input stream. Some images cannot be loaded from a simple URL, for example because they require authentication or a different method or protocol to access. In that case one can fall back to using an InputStream using any access method, however, the option to load the image in the background now can no longer be chosen (even though loading from a URL internally also uses an input stream).

      I propose to provide the missing constructor for this option (similar to the URL one) which offers the backgroundLoading boolean.

      Some work needs to be done to implement this as currently the code is hard wired to never load in the background if there is an InputStream provided. Still, since URL's result in an InputStream and can be loaded in the background, the work should be relatively straight-forward.

      The documentation may also be improved a bit perhaps as it is severely lacking in describing what each constructor does (even referring to "default" values which are not documented).

            jhendrikx John Hendrikx
            jhendrikx John Hendrikx
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: