Add sRGB-Profile to all files in 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
dnisn
Posts: 4
Joined: 2019-06-16T11:32:34-07:00
Authentication code: 1152

Add sRGB-Profile to all files in folder

Post by dnisn »

Hello, I've been archiving mid-resolution Pictures with Irfanview for about 2 years and just found out, that the color-profiles are deleted in all files. The original profile was sRGB. So I would like to re-add profiles to the files via batch conversion of a whole folder. My system is Win10 and IM-Version 7.0.8-48 Q16 x64.

At the moment, I navigate with cmd.exe to the folder and enter the following code, but nothing happens:

Code: Select all

magick mogrify -profile E:\!pf2_kurven\sRGB2014.icc
Best, Kilian
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Add sRGB-Profile to all files in folder

Post by fmw42 »

You need to add * at the end to process every file in the folder. But you should either backup the folder or use -path to a pre-created new folder to hold the output.

Code: Select all

magick mogrify -profile E:\!pf2_kurven\sRGB2014.icc *

See https://imagemagick.org/Usage/basics/#mogrify
dnisn
Posts: 4
Joined: 2019-06-16T11:32:34-07:00
Authentication code: 1152

Re: Add sRGB-Profile to all files in folder

Post by dnisn »

Thank you very much!!! Now it works.
Thank you also for the advice with "-path"!
Post Reply