# Working with Embedded ICC Profiles

In color management, an ICC profile is a set of data that characterizes a color input or output device, or a color space. ICC profiles can be embedded in most image files (for example, in JPEG, TIFF, PSD, etc.). An ICC profile allows you to be sure that an application will correctly color match the file. Graphics Mill can load embedded ICC profiles and save image files with ICC profiles.

To manage the ICC profile of an image use the Bitmap.ColorProfile property.

When you load an image file having an embedded ICC profile into a Bitmap object, the ICC profile is copied to a newly-created temporary .icc file (actually, a temporary file will also be created for a separately-loaded profile). The lifetime of this temporary file is the same as the lifetime of the Bitmap object. After the Bitmap object is disposed, the temporary file will be deleted automatically.

The following code displays the location of the temporary file containing an ICC profile:

C#
//Load CMYK image with embedded ICC profile from file
using (var bitmap = new Aurigma.GraphicsMill.Bitmap(@"Images\cmyk.jpg"))
{
//Display location of the embedded profile
Console.WriteLine("ICC Profile is located here:" + bitmap.ColorProfile.FileName);
}


The following code demonstrates how to embed an ICC profile into an image:

C#
using (var bitmap = new Aurigma.GraphicsMill.Bitmap(@"Images\in.jpg"))
{
//Assign a standard sRGB profile
bitmap.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb();

//Save image with embedded color profile
bitmap.Save(@"Images\Output\out.jpg");
}