Hi. I have loaded a bitmap into a IBitmapBits-type variable called "BitmapData", and I want to directly read the bitmap bit data (24 bit) directly, or copy the data into an array. Thx.
Printable View
Hi. I have loaded a bitmap into a IBitmapBits-type variable called "BitmapData", and I want to directly read the bitmap bit data (24 bit) directly, or copy the data into an array. Thx.
hi, just wonder if the IBitmapBits is an interface or structure. where did u get it ??
HTH
cksiow
http://vblib.virtualave.net - share our codes
****... It was a typo. it's actually IPictureDisp.
so, IPictureDisp, you probably is using picturebox control and would like to get the bitmap array from the picture. If not, just forget about the rest. but you should have a access to the bitmap file and can get it from there, of course, if it is JPeg, it would be more difficult.
okay, in order to put the data into an array, you need to use GetDIBits API, which take in hDC, and hBitmap. the hdc is the Picture1.Hdc, the hBitmap is Picture1.Picture.Handle.
HTH
cksiow
http://vblib.virtualave.net - share our codes