How can I invert the colors of images in bulk?

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
LAPIII
Posts: 3
Joined: 2011-07-19T10:25:45-07:00
Authentication code: 8675308

How can I invert the colors of images in bulk?

Post by LAPIII »

I converted to PDF into images and then was able to invert the colors in MS Paint:

Image

I want to do this in bulk. Please give me some code to do this. I wall stored the images in:

Code: Select all

C:\Users\lapii\Downloads\Images
BTW, I'm using Windows 10.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How can I invert the colors of images in bulk?

Post by snibgo »

What version of IM do you use?

Your question is vague. Perhaps you want to "-negate" the colour channels.

Code: Select all

magick in.png -channels RGB -negate +channels out.png
Does that do what you want? If it does, then put that in a shell "for" loop. Or use "magick mogrify".
snibgo's IM pages: im.snibgo.com
Post Reply