process all photos in the folder

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
caho
Posts: 13
Joined: 2019-06-18T00:29:40-07:00
Authentication code: 1152

process all photos in the folder

Post by caho »

Hello!
Help me please. I am writing through Google translator. If something goes wrong, ask again.

Help with writing a script that will process all the photos that are in the folder this way:

1. Take a photo, compress up to 1000 pixels in width, save in webp format with the name of the original-image-1000.webp, save in the format jpg with the name of the original-image-1000.jpg, then compress the same photo to 500 pixels in width, save in webp format with the name of the original-image-500.webp, save in the format jpg with the name of the original-image-500.jpg

2. Take the next photo and do the same with it.
And so all the photos that will be in the folder.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: process all photos in the folder

Post by snibgo »

What version of IM? What is your script language, eg bash or Windows BAT?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: process all photos in the folder

Post by fmw42 »

See examples of writing multiple images in the same command at https://imagemagick.org/Usage/files/#write
Post Reply