开发者

How to create Binary Tree in a image(.jpeg)

I have data structured in Binary tree format, i want to represent it into an image(*. jpeg) then i need to display that image on web page and all the data will come @ runtime, so image processing should be done @ runtime, how to do this ?

This is what my thought solution any other suitable solution are also welcomed,

web site is 开发者_如何学Cin .NET , i am thinking to produce image using java api then integrate it to .NET wither through WEB-SERVICE call or any other solutions are also welcomed.


Graphviz can convert structured data to a visual representation, including jpeg.

As the representations are usually line drawings, the results will probably look better if you use a non-lossy image format like PNG.

Graphviz comes with a tool called WebDot that (depending on where you are deploying things) might be useful.

Some example binary tree images produced by the tool can be seen here.

JGraph is also something that looks interesting, but I have no experience with it.


solution i found finally


When I created a binary tree for a financial algorithm i created it in SVG format and viewed in Firefox. You can create it in SVG and convert it to PNG with inkscape for example. SVG format is very simple to generate for well defined graph like binary trees. I do not suggest to use JPG as final format for web page. Images containing thin lines are better represented in lossless image formats like PNG.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜