Пример #1
0
        public void DoubleByteConvertTest()
        {
            double[] lab     = new double[] { 62.3068, 55.0094, 71.3368 };
            byte[]   b       = ByteUtil.DoublesToBytes(lab);
            double[] results = ByteUtil.BytesToDoubles(b);

            lab     = ColorConverters.ColorToLab(Color.White);
            b       = ByteUtil.DoublesToBytes(lab);
            results = ByteUtil.BytesToDoubles(b);

            lab     = ColorConverters.ColorToLab(Color.Black);
            b       = ByteUtil.DoublesToBytes(lab);
            results = ByteUtil.BytesToDoubles(b);

            Assert.IsTrue(results[0] == 62.3068);
        }