I have timing issue. When I try to conver quite big jpg file 60-100 MB to small gif it takes around 50 sec. Morover when the same command is runned from PHP the it takes around 5 minutes! Morover CPU usage is 100% which completelly kills web server.
My question is is there any way to do this faster? Actually I generate preview so it doesn't have to be in very good quality. But it need to be generated fast 3-4 sec.
Here is the command which I use
time convert "Test.jpg" -units PixelsPerInch -density 72 -quality 60 -resize 200 "output.gif"
real 0m48.356s
user 0m32.182s
sys 0m11.110s
Convert of big (60MB) JPG file - performance problem
-
- Posts: 3
- Joined: 2010-02-11T07:54:13-07:00
- Authentication code: 8675309
Re: Convert of big (60MB) JPG file - performance problem
Try adding a jpg hint before reading the image:
Depending how new your IM version is there is a new method of writing this but I can not remember what it is !
Code: Select all
convert -size 200x200 "Test.jpg" -units PixelsPerInch -density 72 -quality 60 -resize 200 "output.gif"
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert of big (60MB) JPG file - performance problem
newer method is
-define jpeg:size=200x200 which replaces -size 200x200 as the jpeg hint
see http://www.imagemagick.org/Usage/formats/#jpg_read
-define jpeg:size=200x200 which replaces -size 200x200 as the jpeg hint
see http://www.imagemagick.org/Usage/formats/#jpg_read