ImageCommandSelectPreferredPixelFormat Method |
Namespace: Atalasoft.Imaging.ImageProcessing
protected virtual PixelFormat SelectPreferredPixelFormat( AtalaImage sourceImage, PixelFormat sourceFormat, PixelFormat[] formats )
The default implementation returns the sourceFormat value.
In theory, a command should only ever return pixel format that it has direct support for. Unfortunately, many older commands advertised that they supported pixel formats that were not native to the command. To maintain compatibility with older versions of dotImage, this method allows a command to select a new pixel format for itself, without being bound to the ApplyToAnyPixelFormat property.