
'Declaration Public Class GetColorCountCommand Inherits Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
public class GetColorCountCommand : Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
public __gc class GetColorCountCommand : public Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
public ref class GetColorCountCommand : public Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
Class GetColorCountCommandExample Public Sub ProcessImage() ' [ do not forget to set your image file path here! ] ' open an existing image Dim image As New Vintasoft.Imaging.VintasoftImage("Flower.jpg") ' create the command Dim command As New Vintasoft.Imaging.ImageProcessing.Info.GetColorCountCommand() Try ' execute the command command.ExecuteInPlace(image) Catch ex As Vintasoft.Imaging.ImageProcessing.ImageProcessingException ' show error message if problem occured System.Windows.Forms.MessageBox.Show(ex.Message) Return End Try ' show result System.Windows.Forms.MessageBox.Show(String.Format("Image has {0} unique colors.", command.ColorCount)) End Sub End Class
class GetColorCountCommandExample { public void ProcessImage() { // [ do not forget to set your image file path here! ] // open an existing image Vintasoft.Imaging.VintasoftImage image = new Vintasoft.Imaging.VintasoftImage(@"Flower.jpg"); // create the command Vintasoft.Imaging.ImageProcessing.Info.GetColorCountCommand command = new Vintasoft.Imaging.ImageProcessing.Info.GetColorCountCommand(); try { // execute the command command.ExecuteInPlace(image); } catch (Vintasoft.Imaging.ImageProcessing.ImageProcessingException ex) { // show error message if problem occured System.Windows.Forms.MessageBox.Show(ex.Message); return; } // show result System.Windows.Forms.MessageBox.Show(string.Format("Image has {0} unique colors.", command.ColorCount)); } }
System.Object
Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase
Vintasoft.Imaging.ImageProcessing.ProcessingCommandWithRegion
Vintasoft.Imaging.ImageProcessing.Info.GetColorCountCommand
Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003