←Select platform

ConvertToSourceOptions Enumeration

Summary

Options for converting a LEADTOOLS Leadtools.RasterImage object to Windows Presentation Foundation (WPF) System.Windows.Media.ImageSource.

Syntax
C#
VB
C++
[FlagsAttribute()] 
public enum ConvertToSourceOptions 
  
<FlagsAttribute()> 
Public Enum ConvertToSourceOptions  
   Inherits System.Enum 
   Implements System.IComparable, System.IConvertible, System.IFormattable  
[FlagsAttribute()] 
public enum class ConvertToSourceOptions : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable   

Members
ValueMemberDescription
0x00000000NoneDefault
0x00000001KeepAlphaValues

If the source Leadtools.RasterImage is 32 or 64-bits/pixel, then use the alpha values from this alpha if the result of the conversion is also a 32 or 64-bits/pixel System.Windows.Media.ImageSource.

If this flagged is not specified, the result System.Windows.Media.ImageSource will always have an alpha value of all 1's (255 for 32-bit images or 65535 for 64-bit images) regardless of the alpha values in the source Leadtools.RasterImage. This can be useful when converting some 32-bit images that may have 0 for the alpha (such as BMP files) which translates into an System.Windows.Media.ImageSource that is completely transparent.

If this flag is specified, then the source image alpha values will be used as is.

0x00000002KeepViewPerspective

Keep the original Leadtools.RasterImage view perspective. The Leadtools.RasterImage objects supports having an image data orientation other than the normal top-left through the RasterImage.ViewPerspective property.

If the source Leadtools.RasterImage has a view-perspective other than RasterViewPerspective.TopLeft and this flag is specified, then the result System.Windows.Media.ImageSource might be flipped, reversed or rotated. For example, if the source view-perspective is RasterViewPerspective.BottomLeft and this flag is specified in the conversion options, then the result System.Windows.Media.ImageSource will be flipped.

If this flag is not specified, then the conversion might flip, reverse or rotate the image data as needed to provide correct (top-left) System.Windows.Media.ImageSource.

0x00000004IgnoreLowHighBitsOnGrayImages

Do not use the gray scale bit window values when converting 12 or 16-bit grayscale Leadtools.RasterImage objects. The Leadtools.RasterImage object contains the RasterImage.LowBit and RasterImage.HighBit values that can be set to provide a Window into the image data. This is mostly used by medical applications during a window-leveling operations.

If this flag is specified, the RasterImage.LowBit and RasterImage.HighBit values are ignored and all of the image data is used when converting the Leadtools.RasterImage to System.Windows.Media.ImageSource.

If this flag is not specified, then only the image data between RasterImage.LowBit and RasterImage.HighBit is used.

0x00000008UseSetSource

Note: This option is no longer supported.

0x00000010AutoDetectAlpha

Note: This option is no longer supported.

Remarks

This enumeration is used as the options for converting LEADTOOLS Leadtools.RasterImage objects to Windows Presentation Foundation (WPF) System.Windows.Media.ImageSource through the RasterImageConverter.ConvertToSource method.

For more information refer to RasterImage and WPF.

Example

For an example, refer to RasterImage and WPF Support.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.