Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Any way to create an image from a node in JavaFX 2.0?

ibibbyJul 8 2011 — edited Jul 10 2011
In JavaFX 1.3, there was an undocumented (but still public) method of Scene called renderToImage() that could take the contents of a scene and turn them into a BufferedImage. This was useful for image editing programs and such, because you could take a drawing surface, place shapes on it and stuff, and then flatten it all into an image and save it (though it did involve creating a new scene with only the stuff you wanted in it, and so wasn't terribly straightforward).

I was wondering, does anybody know of a way to get similar functionality out of JavaFX 2.0, short of resorting reflection to get access to internal APIs or something? I noticed that renderToImage() no longer exists. If there isn't a way, does the JavaFX team have any plans to add anything to do the trick in the near future?

Thanks!

Edited by: user8741947 on Jul 8, 2011 3:04 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 7 2011
Added on Jul 8 2011
4 comments
211 views