Philip
Philip

Reputation: 7166

Imagemagick Mogrify crop output name

When using mogrify -crop 500x500 *.jpg

I get output as *-1.jpg, *-2.jpg, *-3.jpg, *-4.jpg

Is it possible to change so that it gets a different separator. eg. underscore?

output: *_1.jpg, *_2.jpg, *_3.jpg, *_4.jpg,

Upvotes: 1

Views: 4713

Answers (1)

xonya
xonya

Reputation: 2474

You can do this with convert:

convert *.jpg -crop 500x500 -set filename:f "%t_%p" '%[filename:f].jpg'

See this page for more info.

Upvotes: 7

Related Questions