Beispiel #1
0
        Pixel SetFore(RGB rgb)
        {
            /*
             * Perform some contrast adjustment and clip the results before applying
             * gamma.  We adjust the contrast because the viewer expects a photograph
             * to be more vivid than the real world.  Without the adjustment, the
             * results won't resemble a photo.  Try removing the contrast adjustment
             * and see for yourself.
             */
            RGB result = rgb * 1.6 - 0.2;

            result.Clamp();
            result.Gamma(1.5);
            return(new Pixel(3)
            {
                Color = result
            });
        }