Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, August 31, 2009 7:27:18 AM(UTC)

pcrock  
pcrock

Groups: Registered
Posts: 3


Since I can't set the Source property of a WPF Image control to a RasterImage object, how do I display a RasterImage in an Image control? I am using LeadTools Imaging 16.5.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, September 1, 2009 2:12:15 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Please check the following forum post:
http://support.leadtools.com/SupportPortal/CS/forums/15388/ShowPost.aspx

This post has a LEADTOOLS v15 example shows how to convert between LEAD RasterImage to WPF BitmapSource. You can modify the example to use LEADTOOLS v16.5.
 
#3 Posted : Tuesday, September 1, 2009 5:02:25 AM(UTC)

pcrock  
pcrock

Groups: Registered
Posts: 3


I actually used this method when evaluating Imaging Pro, but then decided to buy the regular Imaging package because I didn't need many of the things in the Pro package. Since WPF support was one of the features in the regular Imaging package, I thought I wouldn't need to worry about displaying images in an Image control. My problem now is that I have no Leadtools.Windows.Media.dll. I have Media.Effects, Media.TransitionBase, and Media.Transitions, but no regular Media. Is there a way of getting the RasterImageMediaConverter without buying the whole Imaging Pro package? I don't want to spend another thousand dollars for one class.
 
#4 Posted : Wednesday, September 2, 2009 6:07:06 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

LEADTOOLS Imaging toolkit WPF does not have all the features and assemblies of LEADTOOLS Imaging Pro WPF. This means, you will need to upgrade your toolkit and use the Imaging Pro toolkit.
You do not have to pay a full price to upgrade to the Raster Imaging Pro toolkit. You will only pay the price difference. For more information about upgrading your toolkit, please contact sales@leadtools.com.

 
#5 Posted : Friday, September 4, 2009 5:29:45 AM(UTC)

pcrock  
pcrock

Groups: Registered
Posts: 3


Thanks for your help. For future reference to anyone else who has the same problem, I did find a roundabout way of doing it:

// Save the RasterImage to a MemoryStream
MemoryStream stream = new MemoryStream();
using (RasterCodecs codecs = new RasterCodecs())
codecs.Save(myRasterImage, stream, myRasterImageFormat, myRasterImage.BitsPerPixel);

// Create a new BitmapImage from the MemoryStream
BitmapImage img = new BitmapImage();
img.BeginInit();
img.StreamSource = stream;
img.EndInit();

// Set the source of the WPF image to the BitmapImage
wpfImage.Source = img;
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.197 seconds.