Click or drag to resize

ResampleCommandSelectPreferredPixelFormat Method

Chooses a pixel format that is preferred for this command.

Namespace:  Atalasoft.Imaging.ImageProcessing
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
protected override PixelFormat SelectPreferredPixelFormat(
	AtalaImage sourceImage,
	PixelFormat sourceFormat,
	PixelFormat[] formats
)

Parameters

sourceImage
Type: Atalasoft.ImagingAtalaImage
The original source image.
sourceFormat
Type: Atalasoft.ImagingPixelFormat
The original image's pixel format.
formats
Type: Atalasoft.ImagingPixelFormat
An array of pixel formats supported by this command.

Return Value

Type: PixelFormat
A new pixel format to use for this command.
Remarks

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.

See Also