"Defcon31" <st*****@hotmail.com> wrote:
hello
i receive from a dll a pointer to raw image data (307200bytes grayscale
values).
can someone explain how i can put this image data in a picturebox in VB?
or can someone post code to do it please ???
thanks in advance
I did that in VB3, reading a machine vision file (gray scale). You can download
the code from this page:
http://thelabwiz.home.mindspring.com/vbsource.html
Look for VISION. The ZIP file includes the source, the VB3 executable (needs
the VB3 runtime), and some sample images.
You'll have to adapt the code to the dimensions of your image and the
differences in VB3 and whatever version you're using. The original code works
with a fixed format image of 165 lines of 200 bytes each.
The code can threshold the various values to shift the white/black points in the
grayscale. It also can divide the 256 gray levels into 16 colors representing
the pixels in a given range of values as all the same color: i.e., all the pixel
values from 0-15 might be black, 16-31 blue, etc. The code hasn't been updated
since 1993, so I no longer remember the details.
More about me:
http://www.jecarter.com/
VB3/VB6/C/PowerBasic source code:
http://www.jecarter.com/programs.html
Freeware for the Palm with NS Basic source code:
http://nsb.jecarter.com
Drivers for Pablo graphics tablet and JamCam cameras:
http://home.earthlink.net/~mwbt/
johnecarter at@at mindspring dot.dot com. Fix the obvious to reply by email.