Class that contains an ICM/ICC color profile.
Наследование: ImageProfile
Пример #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];
    }
Пример #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];
    }
Пример #3
0
 private static void TestProfile(ColorProfile profile, string name)
 {
   Assert.IsNotNull(profile);
   Assert.AreEqual(name, profile.Name);
   Assert.AreEqual(3144, profile.ToByteArray().Length);
 }
Пример #4
0
 private static void TestEmbeddedResource(ColorProfile profile)
 {
   Assert.IsNotNull(profile);
   Assert.AreEqual("icc", profile.Name);
 }