Mogrify on corrupt images crashing server (doesnt timeout)
Posted: 2011-06-22T16:04:50-07:00
Hi Guys,
I have a little problem. I am using mogrify to trim whitespace from images within a directory in a recursive manner using the unix find command.
However, i have a few corrupt images and mogrify plods along nicely until it hits one of these corrupt images. Then it just hangs and eventually my server loads hits about 80 and dies.
I have tried setting the timeout in both policy.xml and via the command line but it doesnt seem to work.
Is there anyway I can
a: avoid corrupt images
b: avoid images below 10x10 pixels (the corrupt images seem to be 0x0 pixels)
c: make the timeout work so that it skips it if it doesnt complete the task
Hopefully someone can point me in the rigth direction because im stuck for ideas!
thanks in advance guys!
Mike
oh, and the command I am using is:
and also tried:
I have a little problem. I am using mogrify to trim whitespace from images within a directory in a recursive manner using the unix find command.
However, i have a few corrupt images and mogrify plods along nicely until it hits one of these corrupt images. Then it just hangs and eventually my server loads hits about 80 and dies.
I have tried setting the timeout in both policy.xml and via the command line but it doesnt seem to work.
Is there anyway I can
a: avoid corrupt images
b: avoid images below 10x10 pixels (the corrupt images seem to be 0x0 pixels)
c: make the timeout work so that it skips it if it doesnt complete the task
Hopefully someone can point me in the rigth direction because im stuck for ideas!
thanks in advance guys!
Mike
oh, and the command I am using is:
Code: Select all
find /directory/ -name "*.jpg" -exec mogrify -trim -fuzz 1% {} \;
Code: Select all
find /directory/ -name "*.jpg" -exec mogrify -limit time 20 -trim -fuzz 1% {} \;