SaveLUT() public static method

public static SaveLUT ( string file, Color lut ) : void
file string
lut Color
return void
Beispiel #1
0
        public void SaveLut_ValidTable_Succeeds()
        {
            var path = @".\Test Data\monochrome1.lut";

            IOHelper.DeleteIfExists(path);

            ColorTable.SaveLUT(path, ColorTable.Monochrome1);
            Assert.True(File.Exists(path));
        }
Beispiel #2
0
        public void LoadLut_SavedMonochrome2_ReproduceMonochrome2Field()
        {
            var path = @".\Test Data\monochrome2.lut";

            ColorTable.SaveLUT(path, ColorTable.Monochrome2);

            var expected = ColorTable.Monochrome2;
            var actual   = ColorTable.LoadLUT(path);

            for (var i = 0; i < actual.Length; ++i)
            {
                Assert.Equal(expected[i].A, actual[i].A);
                Assert.Equal(expected[i].R, actual[i].R);
                Assert.Equal(expected[i].G, actual[i].G);
                Assert.Equal(expected[i].B, actual[i].B);
            }
        }