
'Declaration Public Class GetUniqueColorCommand Inherits Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
public class GetUniqueColorCommand : Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
public __gc class GetUniqueColorCommand : public Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
public ref class GetUniqueColorCommand : public Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
Class GetUniqueColorCommandExample Public Sub ProcessImage() ' open an image from file Dim image As New Vintasoft.Imaging.VintasoftImage("Deskew.tif") ' create the command Dim command As New Vintasoft.Imaging.ImageProcessing.Info.GetUniqueColorCommand() Try ' execute the command command.ExecuteInPlace(image) Catch ex As Vintasoft.Imaging.ImageProcessing.ImageProcessingException ' show error message if error occured System.Windows.Forms.MessageBox.Show(ex.Message) Return End Try ' show result If command.IsColorDetected Then System.Windows.Forms.MessageBox.Show(String.Format("Image has unique color {0}.", command.Color)) Else System.Windows.Forms.MessageBox.Show("Image does not have unique color.") End If End Sub End Class
class GetUniqueColorCommandExample { public void ProcessImage() { // open an image from file Vintasoft.Imaging.VintasoftImage image = new Vintasoft.Imaging.VintasoftImage("Deskew.tif"); // create the command Vintasoft.Imaging.ImageProcessing.Info.GetUniqueColorCommand command = new Vintasoft.Imaging.ImageProcessing.Info.GetUniqueColorCommand(); try { // execute the command command.ExecuteInPlace(image); } catch (Vintasoft.Imaging.ImageProcessing.ImageProcessingException ex) { // show error message if error occured System.Windows.Forms.MessageBox.Show(ex.Message); return; } // show result if (command.IsColorDetected) { System.Windows.Forms.MessageBox.Show(string.Format("Image has unique color {0}.", command.Color)); } else { System.Windows.Forms.MessageBox.Show("Image does not have unique color."); } } }
System.Object
Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase
Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
Vintasoft.Imaging.ImageProcessing.Info.GetUniqueColorCommand
Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003