473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

working png output from graphing modules

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?
Jul 18 '05 #1
2 2316
In article <98**************************@posting.google.com >, john
<jo**************@mac.com> 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
Jul 18 '05 #2
jo**************@mac.com (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
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: gwerk | last post by:
Hi, I've installed php4.0.4 on a linux machine running apache 1.3.19 but the php is not working properly. When I try to open a php doc all i get is the actual code - not the output eg. <? echo...
1
by: Michael T. Peterson | last post by:
Would anyone care to recommend a good graphing package (commercial or otherwise)? I've looked at some of the PEAR Image packages - The only graphing package is still alpha quality. One...
1
by: Mudcat | last post by:
Hi, I have looked through the previous suggestions on graphing modules and have been able to find some good suggestions. However I was wondering about something more specific. I am going to...
1
by: robby.walker | last post by:
Hi, I've just released a full-featured online graphing calculator at http://www.e-tutor.com/et2/graphing/ It requires no downloads or plugins - just JavaScript. You can track points on the...
0
by: Dexter | last post by:
GraphEasyRect was previously available as an applet. Now we have converted it to a desktop standalone application that runs on multiple platforms Windows, Mac, and Linux This tool allows...
1
by: shlaga | last post by:
Hi, I have query in access that i output in excel and want to graph the output. I have written the code for this in access -> visual basic i want the code to get the range of the xvalues and...
2
by: sydneytroz | last post by:
I am writing a program to simulate a double displacement reaction getting to equilibrium, but I am having some trouble graphing the particles' concentrations. It seems that it's only possible to pan...
5
by: E. J. Gold is the Hi-Tech Shaman | last post by:
(crossposted to sci.math) I'm looking for a tool which will take a dataset of tuples indicating the year of birth and death of a person: (1872, 1950, "Sri Aurobindo") (1821, 1910, "Mary Baker...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.