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

Draw to buffered image for later processing

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:

      Description

      There are times you want to draw nodes into an image so that you can later muck with the pixels or save it to disk.

      requirements:
      * must allow drawing into an image that you can retrieve pixel values from
      * must be able to save to disk (enabled by the above)
      * does not need to be hardware accelerated
      * does not need to support drawing nodes already in a scene (if that would make it harder)
      * this is likely a desktop only feature so it can be in the desktop profile and use java2d apis.

      API Proposal

      javafx.ext.swing.SwingUtils {
      //add script level function
      public function drawToImage(node:Node,image:BufferedImage);
      }

      then the developer can use the standard Java2D apis to grab and manipulate pixels, save to disk, and convert back into a JavaFX image.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kcr Kevin Rushforth
                Reporter:
                jmarinacsunw Joshua Marinacci (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: