PictureEffectsRaw Xojo Plugin

DominantColorsRaw Class (console safe)

Class to get the most dominant colours from image.

This class uses multiple algorithm approach to attempt to get best result for most cases.

Note that clustering algorithms can sometimes be worse case scenario on speed. If selected Strategy is Simple then algorithm is always fast though. And simple can actually often give good results.

This class does not support the multiprocessing unit to execute on multiple CPU cores at once, but it does support native threads and our Task framework.

Object
   DominantColorsRaw

class DominantColorsRaw

Properties

CentroidColorSelector (console safe) Determines how colors are selected from detected clusters.
ClusterSelection (console safe) Determines how initial clusters are selected.
DistanceMode (console safe) Sets how color distancing is evaluated.
FocusCenterContent (console safe) If set to true then the centre 70% of the image is focused since in many photographs the main subject of the image is toward center, and in such cases sometimes should affect the dominant color selection.
Strategy (console safe) Sets the strategy for the dominant color detection.

Methods

GetColors (console safe) Gets dominant colors from RawBitmap based on parameters that have been set on the class.
GetColorsTask (console safe) Async task for getting dominant colors from RawBitmap based on parameters that have been set on the class.

Delegates

CompletionDelegate (console safe) Delegate for completion callback for GetColorsTask function in the DominantColorsRaw class.

Enumerations

DistanceModesEnum to be used with the DistanceMode property on the DominantColorsRaw class.
ClusterSelectionsEnum to be used with the ClusterSelection property on the DominantColorsRaw class.
CentroidColorSelectorsEnum to be used with the CentroidColorSelector property on the DominantColorsRaw class.
StrategiesEnum to be used with the Strategy property on the DominantColorsRaw class.

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS