Class that contains an ICM/ICC color profile.
Inheritance: ImageProfile
Esempio n. 1
0
    private static ColorProfile Load(string resourceName)
    {
      lock (_SyncRoot)
      {
        if (!_Profiles.ContainsKey(resourceName))
        {
          using (Stream stream = Assembly.GetAssembly(typeof(ColorProfile)).GetManifestResourceStream(resourceName))
          {
            _Profiles[resourceName] = new ColorProfile(stream);
          }
        }
      }

      return _Profiles[resourceName];
    }
Esempio n. 2
0
    private static ColorProfile Load(string resourcePath, string resourceName)
    {
      lock (_SyncRoot)
      {
        if (!_Profiles.ContainsKey(resourceName))
        {
          using (Stream stream = TypeHelper.GetManifestResourceStream(typeof(ColorProfile), resourcePath, resourceName))
          {
            _Profiles[resourceName] = new ColorProfile(stream);
          }
        }
      }

      return _Profiles[resourceName];
    }
Esempio n. 3
0
 private static void TestProfile(ColorProfile profile, string name)
 {
   Assert.IsNotNull(profile);
   Assert.AreEqual(name, profile.Name);
   Assert.AreEqual(3144, profile.ToByteArray().Length);
 }
Esempio n. 4
0
 private static void TestEmbeddedResource(ColorProfile profile)
 {
   Assert.IsNotNull(profile);
   Assert.AreEqual("icc", profile.Name);
 }