Previous status:
Code: Select all
$ convert --version
Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
$ free -m
total used free shared buffers cached
Mem: 12000 4342 7658 0 310 2396
-/+ buffers/cache: 1635 10365
Swap: 4095 0 4095
$ identify -list resource
File Area Memory Map Disk Thread Time
-------------------------------------------------------------------------------
768 3.1458GB 11.719GiB 23.438GiB unlimited 4 unlimited
Code: Select all
export MAGICK_MEMORY_LIMIT=6631080
export MAGICK_MAP_LIMIT=6631080
export MAGICK_DISK_LIMIT=1105180
export MAGICK_FILE_LIMIT=10
mkdir 00pages
gs -sDEVICE=png16m -r300 -dNOPAUSE -dQUIET -dBATCH "-sOutputFile=./00pages/pag-%04d.png" "book1.pdf"
mkdir 01contrast
convert "./00pages/*.png" -quality 40 -brightness-contrast -33x40 "./01contrast/pag-%04d.png"
I've read the details described at:
http://www.imagemagick.org/script/architecture.php
http://www.imagemagick.org/script/resources.php
But I have some questions not cleared in the documentation:
- When ImageMagick is called to process several files (with wildcards), does it process one by one, or all at once? If it's all at once, how can I order to process in smaller series?
- Can I specify all limits in bytes every time (memory, map, disk)?
- The order of resource usage is: memory -> map (areas) -> disk (files). Am I right? If is there enough memory, I suppose map and disk aren't used; right?
- Is the "pixel cache memory" a kind of disk cache for "pixel cache files"?
- If I get a page (DIN-A4, 300ppi, 24bpp) I calculate that its binary size is 25MiB. Is this the necessary area for this single image?
- Does ImageMagick need the possibility to open one pixel cache file per image, or more than one?
- I understand memory variables for main working area, and map variables for a subsidiary area. Do have them any relation with using or not using system's swap memory? How can I equilibrate the numbers to maximize performance and avoid disk?