Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

How to export a Graph2d to jpg?

0 votes
Hello,

i'm a little confused on how exactely should I exort a Graph2d to jpg. I suppose the JPGIOHandler is the right class for the job. However, how do i pass my Graph2d object to it? Only in ImageOutputHandler there are some methods accepting a Graph2d, but they all seem to be doing something special.

The most interesting one seems to be write(Graph2d, OutputStream). However, what about the size of the image i can set with createImage()? There is also the method encode(Image, OutputStream), how does that one relate to write? And if i want to use that one, how do i pass it my Graph2d?

In the documentation, in example 9.31, there is a method called writeGraphToFile referenced. Unfortunately, i couldn't find it anywhere in the documentation. I suppose this one would clarifie things.

A code example would be highly appreciated.

Thanks
closed with the note: Not a yEd question.
asked Feb 10, 2015 in Help by anonymous
closed Feb 10, 2015 by thomas.behr

1 Answer

0 votes

This is a forum for yEd questions only. For questions regarding the yFiles for Java programming library, please contact yWorks support by mail. (Please include your yWorks customer or evaluator ID in your mail when doing so.)

answered Feb 10, 2015 by thomas.behr [yWorks] (127,150 points)
Legal Disclosure | Privacy Policy