Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

How to convert between WPF BitmapSource objects and a LEAD RasterImage
Started by Otis at 08-23-2007 13:58. Topic has 0 replies.

Print Search Next Thread »
  08-23-2007, 13:58
Otis is not online. Last active: 8/29/2008 6:44:11 PM Otis



Top 10 Posts
Joined on 10-19-2004
Charlotte, NC
Posts 294
How to convert between WPF BitmapSource objects and a LEAD RasterImage

Attachment: RasterImageMediaConverter.zip
Reply Quote
In order to use any of the LEADTOOLS image processing commands on a WPF image, it must first be converted to a LEADTOOLS RasterImage. The RasterImageMediaConverter class found in V15 provides easy to use methods to convert a RasterImage object to and from an WPF/BitmapSource/ImageSource object. These methods are listed below.

RasterImageMediaConverter.ConvertFrom
RasterImageMediaConverter.ConvertTo method

The attached code sample will show you how to:
1) Convert a WPF bitmap into a LEADTOOLS RasterImage
2) Flip the image using LEADTOOLS FlipCommand
3) Convert the LEADTOOLS RasterImage back into a WPF bitmap.

In this sample, the image was flipped using the LEADTOOLS FlipCommand. With the use of the RasterImageMediaConverter however, you will have access to LEAD's extensive set of image processing commands which can be applied to your WPF bitmap.
Otis Goodwin
LEAD Developer Support
   Report 
Post
LEAD Support Fo... » Developer » DotNet » WPF » How to convert between WPF BitmapSource objects and a LEAD RasterImage

Powered by Community Server, by Telligent Systems