DocumentMedianCommandConstructChangedSourceImage Method |
Namespace: Atalasoft.Imaging.ImageProcessing.Document
The default implementation of ConstructChangedSourceImage requests that the command report its preferred pixel format (typically, this is the source image's pixel format, but some commands support many pixel formats, but work best in gray, for example), and if that is supported, returns a new image in the preferred format if it is different from the source image.
If the pixel format is not supported and ApplyToAnyPixelFormat is set to true, the command is queried for its best alternate pixel format and a new image is returned in that pixel format. If ApplyToAnyPixelFormat is set to false, ConstructChangedSourceImage will throw an IncompatiblePixelFormatException.
If an error occurs, ConstructChangedImage should throw an exception. Any new image constructed by ConstructChangedImage must be a pixel format supported by this command.