Dear,
I have a problem that is the result of the combination of piwigo, GD, my hosting provider's PHP settings, at least that's my analysis so far.
My base images have a fairly high resolution e.g. 4000x3000 or higher even, and it is on purpose that the high resolution images are shared. Upon uploading, using standard piwigo functionality, a mid-size image and thumbnail can be generated (at least on an installation on my local machine that is what happens). On my web-site, though, nothing really happens: the file name gets created in the DB, but upon accessing I get the error message that there is no such file.
It appears that the conversion (shrinking) crashes due to memory limits set by my hosting provider on the maximum size of the PHP process. (So yes the conversion works fine if I use e.g. a 800x600 image). It appears to be a rather known issue about GD because it reads the entire file as a bitmap in memory before starting any manipulation.
I know ImageMagick can be given hints (-sample parameter, see e.g. http://www.imagemagick.org/Usage/resize/#thumbnail) before conversion that not the entire file needs to be read (to keep memory consumption reasonable, and speed too), but my provider doesn't support ImageMagick
So:
* can GD do similar things? And if so, can this be added to the invocation of the GD converter?
* does piwigo, when using ImageMagick, provides these types of hints to ImageMagick?
- if so, I could annoy my hosting provider, and ask him to install ImageMagick
- if not, can it be added to piwigo, so I have an argument to annoy my hosting provider?
using piwigo 2.4.4
Last edited by debruyck (2012-10-07 12:06:10)
Offline
Hi debruyck,
When you look at screen [Administration > Photos > Add > Web Form], Piwigo tells you the authorized file extensions, the maximum filesize and the maximum dimensions in pixels if you're using GD. Considering the amount of memory available for PHP (and thus GD), Piwigo knows what are the biggest dimensions GD can handle for resize.
You should really ask your hosting provider to install ImageMagick : faster, less memory usage, better quality.
Offline
Got things working with ext_imagick, apparently my hosting provider already had it on the server.
Thanks for all your help.
Offline