5416 Posts in 1652 Topics by 1188 members
|Go to End|
13 September 2010 at 12:44am
I recently ran into a problem with uncle cheeses image gallery. I want to migrate the website of my hockey club to silverstripe, but since our hosting provider runs php via fast cgi we can't use more than 32MB of memory (even if you try to set a higher memory limit).
While searching for a work around I noticed, that imagemagick is installed on the server and i'm able to call the command line programms of this library (convert, etc.)
Therefore I have rewritten the GD class to use cli calls instead of built-in gd functions. This is a lot faster and the memory usage of called programms does not count to the limit of PHP.
I'll provide my class to you, but beware: it is not properly tested (just didn't have enough time), it won't check if you are able to use "exec". Also not every feature of the original GD class is implemented (e.g. paddedResize, which will call croppedResize instead).
This is for silverstripe 2.3, I haven't checked if the GD class of 2.4 is compatible.
24 September 2010 at 11:32pm
Hi, here's client size resizing swfupload module it'll be helpful for people who tries to upload photos directly from camera, 'cos when u're trying to upload photo more then 8Mb imagemagic will be pretty slow too.
Thx, gieser with both of that solutions everything works really fast
|Go to Top|