Example #1
0
        protected override void LoadEditor()
        {
            base.LoadEditor();
            BrightnessSettings = new BrightnessDecoratorSettings(Settings);

            float brightness = BrightnessSettings.Brightness * 100;

            trackBarBrightness.Value = (int)brightness;
            _originalBrightness      = (int)brightness;

            float contrast = (100.0f * BrightnessSettings.Contrast) - 100;

            trackBarContrast.Value = (int)contrast;
            _originalContrast      = (int)contrast;
        }
 public void Decorate(ImageDecoratorContext context)
 {
     BrightnessDecoratorSettings bsettings = new BrightnessDecoratorSettings(context.Settings);
     context.Image = AdjustBrightness(bsettings.Brightness, bsettings.Contrast, context.Image);
 }
        protected override void LoadEditor()
        {
            base.LoadEditor();
            BrightnessSettings = new BrightnessDecoratorSettings(Settings);

            float brightness = BrightnessSettings.Brightness * 100;
            trackBarBrightness.Value = (int)brightness;
            _originalBrightness = (int)brightness;

            float contrast = (100.0f * BrightnessSettings.Contrast) - 100;
            trackBarContrast.Value = (int)contrast;
            _originalContrast = (int)contrast;
        }
Example #4
0
        public void Decorate(ImageDecoratorContext context)
        {
            BrightnessDecoratorSettings bsettings = new BrightnessDecoratorSettings(context.Settings);

            context.Image = AdjustBrightness(bsettings.Brightness, bsettings.Contrast, context.Image);
        }