[Tioga-users] .png output
Vincent Fourmond
fourmond at gmail.com
Wed Dec 19 15:39:06 EST 2007
Hello Peter,
Peter Yates wrote:
> I've been experimenting with Tioga for the last few hours and first
> impressions are fantastic.
Good news ;-)..
> I plan to use it in a rails app for making graphs on the fly so would
> like to output in png rather than pdf. Is this possible?
Well, as such, no. But it is fairly easy to use convert as a
post-processing to transform to PNG. That's what I'm doing with the
--png option of ctioga, you might want to have a look at the source
code. Essentially, it boils down to
convert -density 100 Plot.pdf -resize 400x400 Plot.png
This keeps the aspect ratio, as it resizes to something included in
400x400. You might want to increase density to get a better
anti-aliasing (at the expense of processing time, though).
convert is coming from ImageMagick.
By the way, if you don't plan to use fancy aspects of Tioga such as
contour plots, you might want to try ctioga, which is a pure
command-line front-end for Tioga.
Enjoy !
Vincent
More information about the Tioga-users
mailing list