Re: Writing PNG Images to File from Command Line
| From: | dpgirago at mdanderson dot org | Date: | Tue, 22 Feb 2005 20:36:55 +0000 |
| Subject: | Re: Writing PNG Images to File from Command Line | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-209194@lists.php.net to get a copy of this message | ||
Bret, Richard, Jason,
Thank you all for your comments and suggestions.
What I had been doing -- using GD to create the image with db data in one
file, then calling this file from <IMG SRC="make_the
_picture_in_here.php"> in another page, seems to have been the culprit in
regards to the latency issue. Of note is that this is an intranet app,
traffic is not so heavy, and the netadmin has already said that he didn't
think the network was the issue. However at a previous building, the app
worked just fine, which was the only reason that I even pursued the
approach I was taking. Also, Mozilla (Gecko...?) is almost perfectly
stable as opposed to IE, which just doesn't cut it at all.
I had concerns similar to Richard about reading and writing to the same
file at the same time. So, for the time being, we are going to live with a
5 second delay in data availability, i.e., use html to display the latest
image file at the top of the page, then jump into php and overwrite the
file with new data at the bottom of the page, then wait 5 seconds for the
page to refresh with the latest image.
The idea of using pre-made, colored flags, handled within the code, sounds
very reasonable, and if problems persist, I think this approach will be
tried next. There are only 3 colors for flag states, red - yellow - green,
and these cover 24 Neutron monitors, so not too time consuming to
implement. But other data from the db get displayed also, so it still
seems best to create one image with all the data for the entire page,
assuredly large at about 1200 X 800 pixels.
Is it possible to limit the bit-depth or reduce the file size of a PNG
image ? I haven't found anything in the manual about this as yet.
David