public static void Run()
{
// ExStart:ColorConversionUsingICCProfiles
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();
// Load an existing JPG image
using (JpegImage image = (JpegImage)Image.Load(dataDir + "aspose-logo_tn.jpg"))
{
StreamSource rgbprofile = new StreamSource(File.OpenRead(dataDir + "rgb.icc"));
StreamSource cmykprofile = new StreamSource(File.OpenRead(dataDir + "cmyk.icc"));
image.RgbColorProfile = rgbprofile;
image.CmykColorProfile = cmykprofile;
Color[] colors = image.LoadPixels(new Rectangle(0, 0, image.Width, image.Height));
}
// ExStart:ColorConversionUsingICCProfiles
}
}