java - JavaFX: get BufferedImage from path -
coming awt/swing, i've started experimenting bit javafx last few days. realized used in thousands lines of codes can done in few hundred.
one problem came across is, however, following: i'm trying develop small painting app user can choose brush size , color strokes. strokes user makes, use javafx class path
, add these paths group
(which added pane
) - automagically - painted. want store resulting image jpg , try raster paths in bufferedimage. however, found no functions in api me that.
i tried use canvas
, graphicscontext
, did not help. how raster javafx path
s list on image?
- take snapshot of group javafx image.
- use swingfxutils convert javafx image snapshot buffered image.
- use imageio convert buffered image jpeg, png, etc
Comments
Post a Comment