Code: Select all
$scaled = `convert $target_path -resize 800'x'800 $magic_path`;
So, what am I doing wrong and what things can I adjust to improve the situation / create more resources for the process.
Thanks
Nick
Code: Select all
$scaled = `convert $target_path -resize 800'x'800 $magic_path`;
That is find and should work without problem for 1 Gb images, tough a couple of points.niccol wrote:I am uploading images and then scaling them via php with something like:Code: Select all
$scaled = `convert $target_path -resize 800'x'800 $magic_path`;
You are quite welcome!niccol wrote:Thanks guys. Nice to find a friendly, fast and helpful forum.
Almost but not quite.1. The backticks. My understanding was that they emulated the exec command. Is that wrong?
Then try and get the error handling. If the command is shell parsed (backticks or exec() wise) then you can add 2>&1 to ask the shell to redirect stderr to stdout so that you can gather it in a variable (backticks) or to the web page (exec()). With that you could be able to figure out what is the problem..2. Yes, there wasn't much feedback. I'll implement some php error handling. The odd thing here is that it is not slow. It is fast but just doesn't work. It works fine for a 800k image and takes some time. With a 1.2M image it just doesn't happen at all. I think the settings in php.ini are all right.