LEADTOOLS Support
General
General Questions
Re: transfer a bitmap from leadraster.bitmap to system.drawing.image
While some posts in this topic are more current, this topic was posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, June 22, 2005 10:41:20 PM(UTC)
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.
#2
Posted
:
Monday, June 27, 2005 8:47:53 AM(UTC)
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)
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)
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)
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)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
LEADTOOLS Support
General
General Questions
Re: transfer a bitmap from leadraster.bitmap to system.drawing.image
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.