←Select platform

ConvertFromImageSource Method

Summary

Converts a WinRT Windows.UI.Xaml.Media.ImageSource object into a LEADTOOLS RasterImage.

Syntax

C#
VB
WinRT C#
C++
public static Leadtools.RasterImage ConvertFromImageSource(  
   WinRT_ImageSource image, 
   Leadtools.Converters.ConvertFromImageOptions options 
) 
Public Shared Function ConvertFromImageSource( _ 
   ByVal image As WinRT_ImageSource, _ 
   ByVal options As Leadtools.Converters.ConvertFromImageOptions _ 
) As Leadtools.RasterImage 
public static Leadtools.RasterImage ConvertFromImageSource(  
   WinRT_ImageSource image, 
   Leadtools.Converters.ConvertFromImageOptions options 
) 
 function Leadtools.Converters.RasterImageConverter.ConvertFromImageSource(  
   image , 
   options  
) 
public: 
static Leadtools.RasterImage^ ConvertFromImageSource(  
   WinRT_ImageSource^ image, 
   Leadtools.Converters.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 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 RasterImage object with RasterImage.BitsPerPixel equal to 32.

Use the ConvertToImageSource method to convert a 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 RasterImage and a Windows.UI.Xaml.Media.ImageSource.

For more information refer to RasterImage and WinRT.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Converters Assembly