There is a serial number image in the folder as shown below.
myimg_01.png
myimg_02.png
...
myimg_28.png
I would like to convert these to 168px altogether using ImageMagic.I want to reduce the width while keeping the aspect ratio.
I would like to overwrite the converted results in each file or save them in the output destination folder with the same name (I don't want to rename them later).
What kind of command would it be?
imagemagick
Self-resolved.
mogrify-resize x168*.png
↑ Resize all PNG images in the current directory to 168px height.Modify the original file.
Note: http://www.imagemagick.org/script/mogrify.php
It looks like it has already been resolved, but if you want to save it to a file with the same name in the output directory, use the -path
option.
$mogrify-path output_dir-resize x168*.png
Naturally, output_dir
must exist as a directory and be writable.
© 2024 OneMinuteCode. All rights reserved.