Class that contains an ICM/ICC color profile.
Inheritance: ImageProfile
Beispiel #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];
    }
Beispiel #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];
    }
 private static void TestProfile(ColorProfile profile, string name)
 {
   Assert.IsNotNull(profile);
   Assert.AreEqual(name, profile.Name);
   Assert.AreEqual(3144, profile.ToByteArray().Length);
 }
 private static void TestEmbeddedResource(ColorProfile profile)
 {
   Assert.IsNotNull(profile);
   Assert.AreEqual("icc", profile.Name);
 }