Example #1
0
        /// <summary>
        /// Returns the image processing command.
        /// </summary>
        /// <returns>The image processing command.</returns>
        public override ProcessingCommandBase GetProcessingCommand()
        {
#if !REMOVE_DOCCLEANUP_PLUGIN
            AdvancedReplaceColorCommand replaceColor = AdvancedReplaceColorCommand.CreateColorGradientReplaceCommand(
                new Rgb24Color(startColorPanelControl.Color),
                new Rgb24Color(stopColorPanelControl.Color),
                (int)gradientRadiusNumericUpDown.Value,
                new Rgb24Color(replaceColorPanelControl.Color),
                (int)interpolationRadiusNumericUpDown.Value / 10f);
            return(replaceColor);
#else
            throw new NotImplementedException();
#endif
        }
Example #2
0
        /// <summary>
        /// Returns the image processing command.
        /// </summary>
        /// <returns>The image processing command.</returns>
        public override ProcessingCommandBase GetProcessingCommand()
        {
#if !REMOVE_DOCCLEANUP_PLUGIN
            AdvancedReplaceColorCommand replaceColor = AdvancedReplaceColorCommand.CreateColorGradientBinarizationCommand(
                new Rgb24Color(startColorPanelControl.Color),
                new Rgb24Color(stopColorPanelControl.Color),
                (int)gradientRadiusNumericUpDown.Value);
            if (ChangePixelFormatToBlackWhite)
            {
                return(new CompositeCommand(replaceColor, new ChangePixelFormatToBlackWhiteCommand(BinarizationMode.Threshold)));
            }
            return(replaceColor);
#else
            throw new NotImplementedException();
#endif
        }
Example #3
0
        /// <summary>
        /// Executes the AdvancedReplaceColorCommand command.
        /// </summary>
        public void ExecuteAdvancedReplaceColorCommand()
        {
#if !REMOVE_DOCCLEANUP_PLUGIN
            // create the processing command
            AdvancedReplaceColorCommand command = new AdvancedReplaceColorCommand();

            // set properties of command
            PropertyGridForm propertyGridForm = new PropertyGridForm(command, "Advanced Replace Color Command Properties", true);
            if (propertyGridForm.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            ExecuteProcessingCommand(command, true);
#endif
        }