LEADTOOLS WPF and Silverlight (Leadtools.Converters assembly)
LEAD Technologies, Inc

ConvertFromImageSource Method






The Windows.UI.Xaml.Media.ImageSource object containing the image data to convert.
Options to control the conversion operation. Currently there are no extra options and the value of this parameter must be set to ConvertFromImageOptions.None
Converts a WinRT Windows.UI.Xaml.Media.ImageSource object into a LEADTOOLS Leadtools.RasterImage. .NET support WinRT support
Syntax
public static RasterImage ConvertFromImageSource( 
   WinRT_ImageSource image,
   ConvertFromImageOptions options
)
'Declaration
 
Public Shared Function ConvertFromImageSource( _
   ByVal image As WinRT_ImageSource, _
   ByVal options As ConvertFromImageOptions _
) As RasterImage
'Usage
 
Dim image As WinRT_ImageSource
Dim options As ConvertFromImageOptions
Dim value As RasterImage
 
value = RasterImageConverter.ConvertFromImageSource(image, options)
public static RasterImage ConvertFromImageSource( 
   WinRT_ImageSource image,
   ConvertFromImageOptions options
)
 function Leadtools.Converters.RasterImageConverter.ConvertFromImageSource( 
   image ,
   options 
)
public:
static RasterImage^ ConvertFromImageSource( 
   WinRT_ImageSource^ image,
   ConvertFromImageOptions options
) 

Parameters

image
The Windows.UI.Xaml.Media.ImageSource object containing the image data to convert.
options
Options to control the conversion operation. Currently there are no extra options and the value of this parameter must be set to ConvertFromImageOptions.None

Return Value

A Leadtools.RasterImage object representing the converted image.
Remarks

WinRT

Microsoft WinRT currently offers support for 32-bits/pixels only. So the result from this method will always be a Leadtools.RasterImage object with RasterImage.BitsPerPixel equal to 32.

Use the ConvertToImageSource method to convert a LEADTOOLS Leadtools.RasterImage into a WinRT Windows.UI.Xaml.Media.ImageSource object.

The conversion works by copying the image data over to the new destination. Currently, there is no support for sharing memory between a Leadtools.RasterImage and a Windows.UI.Xaml.Media.ImageSource.

For more information refer to RasterImage and WinRT.

Example

For an example, refer to RasterImageConverter.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RasterImageConverter Class
RasterImageConverter Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.