How to optimize rescaling of JPEG 24683x2048
Posted: 2016-12-28T07:40:52-07:00
Hi.
We need to create smaller pictures from a bigone.
We call convert with this parameters.
This call uses a lot off cpu and I/O's.
Does anyone can tell us if this is the 'best' usage of convert or is there a better way to do this?
convert -version
Version: ImageMagick 6.6.9-7 2016-06-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Souce Image:
identify /home/webuser/data/import/512/2016_1228_114000.jpg
/home/webuser/data/import/512/2016_1228_114000.jpg JPEG 24683x2048 24683x2048+0+0 8-bit DirectClass 8.25MB 0.000u 0:00.000
Thanks for any help
We need to create smaller pictures from a bigone.
We call convert with this parameters.
Code: Select all
convert /home/webuser/data/import/512/2016_1228_115000.jpg -strip \
( -clone 0 -write /data/tmp_recent/512_2016_1228_115000_full.jpg \
( -clone 0 -crop 3085x2048 -set filename:tile %[fx:page.x/3085]_%[fx:page.y/2048] +repage +adjoin -write /data/data2/cams/512/2016/12/28/11-50-00_full_%[filename:tile].jpg -delete 0--1 ) -delete 0--1 ) \
( -clone 0 -sample 13016x1080 -write /data/tmp_recent/512_2016_1228_115000_hd.jpg
( -clone 0 -crop 3254x1080 -set filename:tile %[fx:page.x/3254]_%[fx:page.y/1080] +repage +adjoin -write /data/data2/cams/512/2016/12/28/11-50-00_hd_%[filename:tile].jpg -delete 0--1 ) -delete 0--1 ) \
( -clone 0 -sample 9642x800 -write /data/tmp_recent/512_2016_1228_115000_default.jpg \
( -clone 0 -crop 2410x800 -set filename:tile %[fx:page.x/2410]_%[fx:page.y/800] +repage +adjoin -write /data/data2/cams/512/2016/12/28/11-50-00_default_%[filename:tile].jpg -delete 0--1 ) -delete 0--1 ) \
( -clone 0 -sample 9642x800 -scale 800x600^ -gravity Center -crop 800x600+0+0 +repage -write /data/data2/cams/512/mobile_800x600.jpg -gravity undefined -delete 0--1 ) \
( -clone 0 -sample 9642x800 -scale 160x120^ -gravity Center -crop 160x120+0+0 +repage -write /data/data2/cams/512/mobile_160x120.jpg -gravity undefined -delete 0--1 ) \
( -clone 0 -sample 5424x450 -write /data/tmp_recent/512_2016_1228_115000_reduced.jpg -write /data/data2/cams/512/2016/12/28/11-50-00_reduced.jpg -delete 0--1 ) \
( -clone 0 -sample 5424x450 -scale 1280x160^ -gravity Center -crop 1280x160+0+0 +repage -write /data/data2/cams/512/mobile_1280x160.jpg -gravity undefined -delete 0--1 ) \
( -clone 0 -sample 3616x300 -write /data/tmp_recent/512_2016_1228_115000_optimized.jpg -write /data/data2/cams/512/2016/12/28/11-50-00_optimized.jpg -delete 0--1 ) \
( -clone 0 -sample 1808x150 -write /data/tmp_recent/512_2016_1228_115000_small.jpg -write /data/data2/cams/512/2016/12/28/11-50-00_small.jpg -delete 0--1 ) \
( -clone 0 -sample 1808x150 -scale 800x75^ -gravity Center -crop 800x75+0+0 +repage -write /data/data2/cams/512/mobile_800x75.jpg -gravity undefined -delete 0--1 ) \
( -clone 0 -sample 904x75 -write /data/tmp_recent/512_2016_1228_115000_thumb.jpg -write /data/data2/cams/512/2016/12/28/11-50-00_thumb.jpg -delete 0--1 ) \
null:
Does anyone can tell us if this is the 'best' usage of convert or is there a better way to do this?
convert -version
Version: ImageMagick 6.6.9-7 2016-06-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Souce Image:
identify /home/webuser/data/import/512/2016_1228_114000.jpg
/home/webuser/data/import/512/2016_1228_114000.jpg JPEG 24683x2048 24683x2048+0+0 8-bit DirectClass 8.25MB 0.000u 0:00.000
Thanks for any help