my company plans to purchase Imaging.NET SDK. Therefore I was asked to test the evaluate version, by writing a small test program that would use the functions we need.
I looked at the ImagingDemo project, and want to create a ImageProcessing Dialog that handles brightness/contrast command as well as hue/saturation/luminance command.
When I perform both commands behind each other using the ExecuteInPlace function it works as expected.
Code: Select all
imageViewer1.Images.Add(filename);
Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessContrastCommand command =
new Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessContrastCommand(50, 5);
command.ExecuteInPlace(imageViewer1.FocusedImage);
Vintasoft.Imaging.ImageProcessing.Color.ChangeHueSaturationLuminanceCommand command2 =
new Vintasoft.Imaging.ImageProcessing.Color.ChangeHueSaturationLuminanceCommand(0, -100, 0);
command2.ExecuteInPlace(imageViewer1.FocusedImage);
Code: Select all
public ColorEditingDialog(VintasoftImage image, Rectangle processingRectangle) : this()
{
ImageProcessingPreview imgPreview;
imgPreview = new ImageProcessingPreview(previewImageViewer, image, processingRectangle);
ProcessingCommandBase command1 = GetProcessingCommand1(50, 5);
if (command1 != null)
imgPreview.ExecuteProcessing(command1);
ProcessingCommandBase command2 = GetProcessingCommand2(0, -100, 0);
if (command2 != null)
imgPreview.ExecuteProcessing(command2);
}
protected virtual ProcessingCommandBase GetProcessingCommand1(Int32 b, Int32 c)
{
return new Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessContrastCommand(b, c);
}
protected virtual ProcessingCommandBase GetProcessingCommand2(Int32 h, Int32 s, Int32 l)
{
return new Vintasoft.Imaging.ImageProcessing.Color.ChangeHueSaturationLuminanceCommand(h, s, l);
}
Best regards
Steve Kirchmer