示例#1
0
        internal static IColorComponents Load(ColorBookReader reader)
        {
            ComponentLab lab = new ComponentLab();

            lab.L = (byte)(reader.ReadByte() / 2.55d + 0.5d);
            lab.a = (sbyte)(reader.ReadByte() - 128);
            lab.b = (sbyte)(reader.ReadByte() - 128);

            return lab;
        }
示例#2
0
        internal static IColorComponents Load(ColorBookReader reader)
        {
            ComponentRGB rgb = new ComponentRGB();

            rgb.Red = reader.ReadByte();
            rgb.Green = reader.ReadByte();
            rgb.Blue = reader.ReadByte();

            return rgb;
        }
示例#3
0
        internal static IColorComponents Load(ColorBookReader reader)
        {
            ComponentCMYK cmyk = new ComponentCMYK();

            cmyk.Cyan = (byte)((255d - reader.ReadByte()) / 2.55d + 0.5d);
            cmyk.Magenta = (byte)((255d - reader.ReadByte()) / 2.55d + 0.5d);
            cmyk.Yellow = (byte)((255d - reader.ReadByte()) / 2.55d + 0.5d);
            cmyk.Key = (byte)((255d - reader.ReadByte()) / 2.55d + 0.5d);

            return cmyk;
        }