Page 1 of 1

Bulk process of mogrify command

Posted: 2016-07-08T05:04:42-07:00
by karkovo
I have a folder with these images:
test_0.png
test_1.png
test_2.png
test_3.png
test_4.png
...

This command works fine for one image.

Code: Select all

mogrify -gravity center -background white -extent 200x200 -draw 'image Dst_Over 0,0 0,0 "test_0.png"' *.png
My problem is that I need to run this command for all images, so I want a bulk process of all images in that directory without the need of specify the image.

How can I do that? thanks

Re: Bulk process of mogrify command

Posted: 2016-07-08T05:28:22-07:00
by snibgo
I don't know what you are trying to do. Perhaps you want to paste test_0.png over each image (including itself) in turn.

I suggest you use "convert" instead of "mogrify". This will operate on one image at a time. Then put that in a shell "for" loop.

Re: Bulk process of mogrify command

Posted: 2016-07-08T06:49:38-07:00
by karkovo
snibgo wrote:I don't know what you are trying to do. Perhaps you want to paste test_0.png over each image (including itself) in turn.

I suggest you use "convert" instead of "mogrify". This will operate on one image at a time. Then put that in a shell "for" loop.
Just to clarify.

-I have a folder with images (140x108)
-I need to extend each image to the size of 200x200, by filling with white the background

Well aparenlty this works fine:

Code: Select all

mogrify -gravity center -background white -extent 200x200  *.png
thanks