CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2001
    Location
    Perth
    Posts
    4

    Access bitmap bits from IBitmapDisp-type variable

    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.


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Access bitmap bits from IBitmapDisp-type variable

    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

  3. #3
    Join Date
    Jul 2001
    Location
    Perth
    Posts
    4

    Re: Access bitmap bits from IBitmapDisp-type variable

    ****... It was a typo. it's actually IPictureDisp.


  4. #4
    Join Date
    Apr 2000
    Posts
    737

    Re: Access bitmap bits from IBitmapDisp-type variable

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured