You are here: Re: Where can I find the GD Library standalone executable file? « PHP Programming Language « IT news, forums, messages
Re: Where can I find the GD Library standalone executable file?

Posted by comp.lang.php on 05/19/06 17:37

Erwin Moller wrote:
> comp.lang.php wrote:
>
> > I downloaded the tarball and while was able to compile within PHP with
> > no problems, I am having memory timeout issues involving image
> > manipulation with extremely large images (800K - 2mb). Requirements
> > are to create thumbnails for even these banner-sized images, but PHP +
> > GD + [huge image] = too much memory.
> >
> > I'm trying to prove that it is undoable, though the suggestion was to
> > do a command-line GD call to the image instead of using the PHP
> > functions to do so to save some memory; if it still times out, then
> > it's undoable altogether.
> >
>
> Hi Phil,
>
> Both the timeout- and the memoryissue are relative.
> You can adjust them to your own liking.
> This can be done by via php.ini or via ini_set() above your script.
>
> Just browse through php.ini and look for the timeoutsettings
> (max_execution_time) for a script and max_memorysize (memory_limit).
>
> Read more here:
> http://nl3.php.net/manual/en/function.ini-set.php
> and
> http://nl3.php.net/manual/en/ini.php#ini.list
>
>
>
> > However, I cannot find the standalone executable file that will ensure
> > I can run GD from the command line. Suggestions?
>
> As far as I know, you never call the GD libs directly.
> (But maybe somebody wrote a wrapper, not sure, why not use PHP as wrapper?
> It has many nice functions.)
>
> One more note on the memory-issue:
> If you have a jpg file of say: 100 KB with dimensions of 1000 X 400 pixels ,
> and the file is represented as 24-bit in memory, PHP (and any language)
> needs a LOT more than 100KB to store it.
>
> You can easily estimate the memory needed: width X heigth X 3 bytes, so that
> will be 1.200.000 Bytes for an 1000x400 image.
>
> Just increase the memory needed and the time your scripts needs.
> I think that is by far the easiest solution. :-)
>

Hey, that's what I'm doing now, although not as precisely as what you
have, however, it still runs out of memory, because while PHP increases
memory for itself, it resides on an active live server implementing
several other applications, thus, it either takes away memory from
another working application, or it never gets the extra memory it needs
because another application is using the memory up at the time, thus,
increasing memory doesn't always work in this case.

I was told by people at the DC PHP user's group that the best way to
debug this issue is to run GD from the command line (I read online as
well that this is possible, sorry for those who doubt, but supposedly
there's a Perl wrapper out there) to see if GD + PHP = too much memory
then GD + PHP - PHP = [how much memory?].

Phil


> Good luck
>
> Regards,
> Erwin Moller
>
> >
> > Thanx
> > Phil

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация