I have been using a line like this in my php code to trigger creation of small thumbnails on demand when a URL is accessed with an http GET:
Code: Select all
system("convert $inputFile -resize $width x $height -colorspace RGB -profile sRGB.icm -strip $destinationFile 1> debug1.txt 2> debug2.txt", $systemreturn);
* If the PHP code is killed, does that also send kill to convert?
* If kill is sent to convert, can that result in convert leaving files lying in /tmp?
I have seen instances where multiple files named magick... have been left in /tmp, each more than 1Gbyte in size. Eventually /tmp fills up and the server stops working until I fix it. I'm seeking any solution to this I can find, while still enabling users to see thumbnails of giant images.
This is a 1-processor LAMP server running ImageMagick 6.5.4-7 2014-02-10 Q16.
I've seen advice elsewhere on this forum to process large images with stream but that does not support -scale. Can I reduce image pixel count with stream? Is stream useful? Thanks!