Page 1 of 1

How can I invert the colors of images in bulk?

Posted: 2019-01-13T07:50:51-07:00
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.

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

Posted: 2019-01-13T08:19:38-07:00
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".