Help - Search - Member List - Calendar
Full Version: ImageMagick Convert Help
WorkTheWeb Forums > Webmaster Resources > PHP Help
Support our Sponsors!
Exyle
Hi,
I'm working on a script that grabs some bitmap data out of a database, I
need it display it in png format. The issue I'm having is that the
bitmap data is stored in a variable, not a file, likewise I have no need
to store the converted png data in a seperate file, I just want it
printed as the php files output. From my experience convert works like
this: "convert input_file.ext output_file.ext"
Is there a way that Instead of having it look for a file and then output
a file I could have it take the bitmap data from the variable and output
the png data into another variable?

Currently I'm working around with having the data put into temporary
image files and then read back into the script but I wanted to know if
there was a more efficiant way.

Mitja
On Tue, 05 Jul 2005 22:16:32 +0200, Exyle <[Email Removed]> wrote:

QUOTE
Currently I'm working around with having the data put into temporary
image files and then read back into the script but I wanted to know if
there was a more efficiant way.

Almost surely you can redirect ImageMagick's output to stdout (standard
output), then read it from your php script via a pipe. Won't be much more
efficient, though: the speedup (if any, since he file usu doesn't even get
written to disk, but rather stays in memory - talking of linux here) is
negligible compared to time needed to do the actual conversion. So I'd say
stick with the most obvious way to do it, whichever you consider that to
be.


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.