RasterImage And WinRT

The LEADTOOLS RasterImage class provides for a platform-independent representation of an image. It serves as a working area for image manipulation and conversion. LEADTOOLS functions use this class for accessing the image in memory and for maintaining the characteristics of the image. This topic discusses how to use the LEADTOOLS RasterImage class with the WinRT platform (Windows.UI.Xaml).

Image Display

In the Microsoft WinRT platforms, you do not paint an image directly on the screen. Instead, you put your graphics content into a Windows.UI.Xaml.Media.ImageSource object (or one of its derived classes) and then display this object by putting it inside a Windows.UI.Xaml.Controls.Image tag in the XAML file.

LEADTOOLS images are typically stored in a Leadtools.RasterImage object. So to display a LEADTOOLS image, simply call one of the image conversion methods described below to obtain a Windows.UI.Xaml.Media.ImageSource from the Leadtools.RasterImage.

Also, LEADTOOLS comes with feature-rich controls, such as the Leadtools.Controls.ImageBox, Leadtools.Controls.ImageViewer and Leadtools.Controls.RasterImageViewer, that can be used to write WinRT (Windows Store) applications. These are composite controls that include a Windows.UI.Xaml.Controls.Image tag inside of them. Using these controls, you can display a Windows.UI.Xaml.Media.ImageSource or Leadtools.RasterImage in your application with many effects such as the automatic handling of Leadtools.RasterImage changes and conversion to an Windows.UI.Xaml.Media.ImageSource, scrolling, panning, zooming, pinch and zoom, and magnifying glass. These controls support mouse and multi-touch (gesture) input.

Image Conversion

The Leadtools.RasterImage class supports more pixel and color formats than the Windows.UI.Xaml.Media.ImageSource and its derived classes. LEADTOOLS allow you to convert a RasterImage object into a Windows.UI.Xaml.Media.ImageSource.

LEADTOOLS also allows you to convert from a Windows.UI.Xaml.Media.Imaging.WriteableBitmap to a LEADTOOLS RasterImage.

Conversion to and from WinRT Images

Use the RasterImageConverter.ConvertToImageSource method to convert a RasterImage into a Windows.UI.Xaml.Media.ImageSource object. Use the RasterImageConverter.ConvertFromImageSource method to convert a Windows.UI.Xaml.Media.Imaging.WriteableBitmap object into a RasterImage class object.

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document
Click or drag to resize