using ImageMagick; MagickImage image = new MagickImage("input.jpg"); image.AddProfile("icc", "color_profile.icc"); image.Write("output.jpg");
using ImageMagick; MagickImage image = new MagickImage("input.jpg"); image.AddProfile("iptc", "metadata_profile.iptc"); image.Write("output.jpg");This code reads an input image file, adds an IPTC metadata profile from the "metadata_profile.iptc" file, and then writes the resulting image to an output file. In both examples, the AddProfile method allows you to specify the type of profile you want to add (ICC or IPTC), and the path to the file containing the profile data. The resulting image will have the profile embedded, allowing software that supports the profile to accurately display and manipulate the image. This example uses the ImageMagick package/library.