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 : Wednesday, June 22, 2005 10:41:20 PM(UTC)

matiasm  
matiasm

Groups: Registered
Posts: 1


Hi,
I use VB dotnet , but still the COM library (v.14).
Can you tell me how to create a new system.drawing.image from a leadraster.bitmap?
In VB6, I used the "setpicture" and "getpicture" methods to put a lead bitmap y a windows control , like a picturebox.
But in dotNet  I dont know how to do it.
I tryed getDIB but without good results.
Thanks in advance

Matias Molleja
KITOLI.

 

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 : Monday, June 27, 2005 8:47:53 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

 

You can create a new System.Drawing.Image object from a LeadRaster bitmap by using the following C# code:

======================================

System.Drawing.Image image1;

stdole.IPictureDisp pic = axLEADRasterView1.Raster.GetPicture();

image1 = System.Drawing.Image.FromHbitmap(new IntPtr(pic.Handle), new IntPtr(pic.hPal));

pictureBox1.Image = image1;

======================================

 

Regards,

Maen Badwan

LEADTOOLS Technical Support

 
#3 Posted : Thursday, February 15, 2007 11:35:14 AM(UTC)

DanOls  
DanOls

Groups: Registered
Posts: 3


How can I do the same thing using a RasterImage object as the source?
 
#4 Posted : Monday, February 19, 2007 6:30:33 AM(UTC)

serbach  
serbach

Groups: Registered
Posts: 9


DanOls,

I've used the RasterImage.ConvertToGdiPlusImage() method for that purpose. It's very quick, too, at least in v. 15.

Steve Erbach
Neenah, WI
http://TheTownCrank.blogspot.com
 
#5 Posted : Monday, February 19, 2007 10:45:57 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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

Steve,
Thank you for the feedback.

Also, if you are using our .NET 14.5 classes, you can convert a LEAD RasterImage to System.Drawing.Image using the ChangeToGdiPlusImage Method.

 
#6 Posted : Monday, April 10, 2017 9:22:03 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

In LEADTOOLS 17 and later, RasterImage does not contain the ChangeToGdiPlusImage(). Instead, use the Leadtools.Drawing.RasterImageConverter.ChangeToImage() method. This will return a System.Drawing.Image. If you need a copy of the image instead, you can use RasterImageConverter.ConvertToImage().
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.086 seconds.