working png output from graphing modules

Discussion in 'Python' started by john, Sep 23, 2003.

  1. john

    john Guest

    Are there any charting or graphing modules for python that can write
    PNG, JPEG, or GIF graphics? I have found a couple of nice looking
    packages that can make beautiful postscript, PDF, or SVGs (PyChart and
    ReportLab) but they can't make PNGs, GIFs, or JPEGs. (On my Solaris
    machine with Python 2.2 they don't.) Or are there any simple UNIX
    filters to convert SVG, PDF, or ps files to PNG?
     
    john, Sep 23, 2003
    #1
    1. Advertising

  2. john

    Robin Becker Guest

    In article <>, john
    <> writes
    >Are there any charting or graphing modules for python that can write
    >PNG, JPEG, or GIF graphics? I have found a couple of nice looking
    >packages that can make beautiful postscript, PDF, or SVGs (PyChart and
    >ReportLab) but they can't make PNGs, GIFs, or JPEGs. (On my Solaris
    >machine with Python 2.2 they don't.) Or are there any simple UNIX
    >filters to convert SVG, PDF, or ps files to PNG?

    ReportLab certainly makes png/gif/jpeg, but only if you build the
    _renderPM extension and also PIL. I know that's possible with solaris 8
    as I have done it myself, but haven't done much with later versions.
    There's also a requirement to get appropriate T1 font files.
    --
    Robin Becker
     
    Robin Becker, Sep 23, 2003
    #2
    1. Advertising

  3. john

    Tim Evans Guest

    (john) writes:

    > Are there any charting or graphing modules for python that can write
    > PNG, JPEG, or GIF graphics? I have found a couple of nice looking
    > packages that can make beautiful postscript, PDF, or SVGs (PyChart and
    > ReportLab) but they can't make PNGs, GIFs, or JPEGs. (On my Solaris
    > machine with Python 2.2 they don't.) Or are there any simple UNIX
    > filters to convert SVG, PDF, or ps files to PNG?


    The 'convert' utility from ImageMagick (google for it) is very good at
    converting PDF or PS to PNG. It uses ghostscript to do the actual
    conversion; it's just very good at choosing the right options to pass
    to ghostscript.

    convert -geometry 800x600 -density 200 foo.ps foo.png

    Will convert a postscript to a png, keeping the aspect ratio correct
    but making it fit inside an 800 by 600 pixel area. The -density
    argument tells it the dpi to use when rendering the image. Higher
    values are slower but give better results.

    --
    Tim Evans
     
    Tim Evans, Sep 24, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Davis

    crystal reports does graphing?

    Jon Davis, Jan 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    347
    S. Justin Gengo
    Jan 20, 2004
  2. Replies:
    0
    Views:
    475
  3. Jim
    Replies:
    6
    Views:
    736
  4. hennessy

    graphing link list nodes... modules?

    hennessy, Jun 2, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    114
    hennessy
    Jun 2, 2004
  5. Mart van de Wege

    Converting SVG to PNG not working.

    Mart van de Wege, Oct 18, 2009, in forum: Perl Misc
    Replies:
    3
    Views:
    391
    Mart van de Wege
    Oct 20, 2009
Loading...

Share This Page