GraphStream Users

Archives de la liste Aide


Re: Export graph to image file


Chronologique Discussions 
  • From: Antoine Dutot <antoine.dutot AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: Re: Export graph to image file
  • Date: Tue, 5 Jul 2011 00:06:16 +0200

Alternatively, you can store a "ui.screenshot" attribute on the graph whose value is the file name of the result. This attribute will be read by the viewer and it will output the screenshot and then automatically delete the attribute.

For example:

graph.addAttribute("ui.screenshot", "some/place/image.png");

This should work with version 1.0. We really need to document this !!

Regards,

Antoine

Le 4 juil. 2011 23:48, "guilhelm savin" <guilhelm.savin AT gmail.com> a écrit :
> Hi Javier,
>
> Thanks for the interest you have to GraphStream :)
>
> The problem of writing a simple image (so make a screenshot) has
> already be raised and I have done some modifications in FileSinkImages
> to do that but ... I do not have commited this changes !
>
> These changes allow to use FileSinkImage.writeAll(graph, "image.ext") to
> export a single image.
>
> I just make some verifications on the code and I will commit it.
>
> Regards.
>
>
> 2011/7/4 Javier Orellana <fjorella AT ual.es>
>
>> Hello,
>>
>> First of all, I would like to congratulate the development team for this
>> version of GraphStream. It seems to be really powerful and according to the
>> example videos you have posted in the web I only can say: AWESOME
>>
>> Well, I am testing the GraphStream library trying to perform some basic
>> actions before doing more complicated stuff. The thing is that I am missing
>> the GraphViewerRemote class used in previous versions to obtain a screenshot
>> of the graph.
>> In other thread I have been reading about a similar issue and the answer
>> was related to the tutorial in this page: http://graphstream-project.**
>> org/doc/Tutorials/Creating-a-**movie-with-FileSinkImages_1.0/<http://graphstream-project.org/doc/Tutorials/Creating-a-movie-with-FileSinkImages_1.0/>
>>
>> For what I understand, that tutorial explains how to generate a sequence of
>> images basing on the instructions stored in a DGS file.
>> I am wondering if it would be possible to build an only picture showing the
>> final graph, which is generated by means of the Graph class (just like it
>> was performed in the 0.4.2 version)
>>
>> I have been reading the tutorial but It doesn't result too much clear about
>> this topic.
>>
>> Thank you and congratulations again :)
>>
>> Regards,
>>
>> Javier Orellana
>>
>>
>
>
> --
> Guilhelm Savin
> PhD Student of Computer Science
> LITIS, University of Le Havre
> \/\/\/\/\/\/
> http://d3-project.org
> http://litis.univ-lehavre.fr/~savin
> http://iscn.univ-lehavre.fr
> http://www.graphstream-project.org
> /\/\/\/\/\/\



Archives gérées par MHonArc 2.6.16.

Top of page