batch processing / response file support
Posted: 2019-04-18T15:15:53-07:00
Hi
We use imagemagick to process 1000's of images as part of our build process.
As a test I've timed processing a subset of these files - around 1000.
Invoking convert for every file takes around 3 minutes, where each operation is like this
convert -resize 64x64! Character_packs.bmp -type truecolor tmp/Character_packs.bmp
I then have a modified version of convert that I can pass a file with the same operations like below
-resize 64x64! Character_packs.bmp -type truecolor tmp/Character_packs.bmp
and which loops over the file 'creating' argc & argv from the file without having the overhead of invoking convert for everyfile
timing both methods shows that the second method is way faster
$ time sh callperfile.sh
real 2m59.130s
user 2m36.229s
sys 0m19.217s
$ time convert @tmp.txt
real 0m22.214s
user 0m20.685s
sys 0m1.508s
I ran these tests on a mac but the same speed up applies to windows.
I'd like to contribute this change back to the source for imagemagick so that we don't have to keep our own version,
and so that anyone else can make use of this.
How do I go about proposing this change, and are there any docs for coding standards I should adhere to?
cheers
Rob
We use imagemagick to process 1000's of images as part of our build process.
As a test I've timed processing a subset of these files - around 1000.
Invoking convert for every file takes around 3 minutes, where each operation is like this
convert -resize 64x64! Character_packs.bmp -type truecolor tmp/Character_packs.bmp
I then have a modified version of convert that I can pass a file with the same operations like below
-resize 64x64! Character_packs.bmp -type truecolor tmp/Character_packs.bmp
and which loops over the file 'creating' argc & argv from the file without having the overhead of invoking convert for everyfile
timing both methods shows that the second method is way faster
$ time sh callperfile.sh
real 2m59.130s
user 2m36.229s
sys 0m19.217s
$ time convert @tmp.txt
real 0m22.214s
user 0m20.685s
sys 0m1.508s
I ran these tests on a mac but the same speed up applies to windows.
I'd like to contribute this change back to the source for imagemagick so that we don't have to keep our own version,
and so that anyone else can make use of this.
How do I go about proposing this change, and are there any docs for coding standards I should adhere to?
cheers
Rob