Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

create a bitmap from an intptr to scanned data

1 view
Skip to first unread message

mickey

unread,
Dec 20, 2009, 12:29:59 PM12/20/09
to
Hi All
I have successfully retreived a pointer to scanned image data but all
efforts to turn this data into a bitmap have failed. Can anybody help?

Thanks
Mickey

Family Tree Mike

unread,
Dec 20, 2009, 1:07:29 PM12/20/09
to

A pointer? That isn't likely. You would need the actual image data.

If it really is a handle to a GDI+ bitmap, then look at
Image.FromHBitmap(handle as IntPtr).


--
Mike

Herfried K. Wagner [MVP]

unread,
Dec 20, 2009, 6:28:18 PM12/20/09
to
Am 20.12.2009 18:29, schrieb mickey:
> I have successfully retreived a pointer to scanned image data but all
> efforts to turn this data into a bitmap have failed. Can anybody help?

Did you already take a look at the overloaded 'Bitmap' constructor?
There is one overload ('New(Int32, Int32, Int32, PixelFormat, IntPtr)')
which expects a pointer to binary bitmap data in its last parameter.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

mickey

unread,
Dec 20, 2009, 8:54:45 PM12/20/09
to
Thanks
I am now looking into that exact thing.
Mickey

"Herfried K. Wagner [MVP]" <hirf-spa...@gmx.at> wrote in message
news:ucQ8dwcg...@TK2MSFTNGP02.phx.gbl...

0 new messages