/// <summary> /// Blends an image. /// </summary> public void Blend() { if (_disableBlending) { return; } ColorBlendCommand command = new ColorBlendCommand(_blendMode, _blendColor); _imageProcessingPreviewInViewer.SetCommand(command); }
/// <summary> /// Executes the ColorBlendCommand command. /// </summary> public void ExecuteColorBlendCommand() { ColorBlendForm dlg; try { dlg = new ColorBlendForm(_viewer, ViewerSelectionRectangle, _blendColor, _blendMode); } catch (ImageProcessingException ex) { MessageBox.Show(ex.Message, "Image processing exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (dlg.ShowProcessingDialog()) { _blendMode = dlg.BlendMode; _blendColor = dlg.BlendColor; ColorBlendCommand command = ImageProcessingCommandFactory.CreateColorBlendCommand(_viewer.Image); command.BlendingMode = _blendMode; command.BlendColor = _blendColor; ExecuteProcessingCommand(command); } }