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

Draw to buffered image for later processing

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • javafx

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: