コード例 #1
0
        public void IccIsNullWithInvalidData()
        {
            var data = CreateTestData();

            using var icc = SKColorSpaceIccProfile.Create(data);

            Assert.Null(icc);
        }
コード例 #2
0
        public void IccToXyzIsCorrect()
        {
            var path = Path.Combine(PathToImages, "AdobeRGB1998.icc");

            using var data = SKData.Create(path);

            using var icc = SKColorSpaceIccProfile.Create(data);
            var xyz = icc.ToColorSpaceXyz();

            Assert.Equal(SKColorSpaceXyz.AdobeRgb, xyz);
        }
コード例 #3
0
        public void IccCanBeConstructedFromData()
        {
            var path = Path.Combine(PathToImages, "AdobeRGB1998.icc");

            using var data = SKData.Create(path);

            using var icc = SKColorSpaceIccProfile.Create(data);

            Assert.NotNull(icc);
            Assert.NotEqual(IntPtr.Zero, icc.Buffer);
            Assert.Equal(data.Size, icc.Size);
        }
コード例 #4
0
        public void USWebCoatedSWOPIsUnsupportedCMYK()
        {
            var path = Path.Combine(PathToImages, "USWebCoatedSWOP.icc");
            var data = File.ReadAllBytes(path);

            var icc = SKColorSpaceIccProfile.Create(data);

            Assert.NotNull(icc);

            var colorspace = SKColorSpace.CreateIcc(icc);

            Assert.Null(colorspace);
        }