Results 1 to 5 of 5

Thread: vbCFBitmap vs vbCFDIB

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Posts
    195

    vbCFBitmap vs vbCFDIB

    Hello everybody. I know the Clipboard object supports two formats, Bitmap and DIB. I also know that bitmaps can either be device-dependent or device-independent. The difference between these two formats goes beyond my competency and I don't want to delve into it. However, I hear that all bitmaps are stored in memory as DIBs, so my question is: what difference does it make whether I store a bitmap in the clipboard into the bitmap or the DIB "folder"? Thank you.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: vbCFBitmap vs vbCFDIB

    vbCFDIB stores both the bitmap and the palette while vbCFBitmap is only the bitmap.

    vbCFBitmap + vbCFPalette = vbCFDIB

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Posts
    195

    Re: vbCFBitmap vs vbCFDIB

    Okay, so the difference is not relevant nowadays, since palettes are not used anymore with modern displays, right?

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: vbCFBitmap vs vbCFDIB

    A DIB is always a device independent bitmap and for such a bitmap you need a palette.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 2008
    Posts
    195

    Re: vbCFBitmap vs vbCFDIB

    What I mean is that, as far as I know, nobody fusses about setting palettes anymore, koz the video driver takes care of everything. As a matter of fact, the form's Palette and PaletteMode are completely ignored, and hPal returns 0, unless you run VB under 256-color emulation. This doesn't mean that palettes are useless: as you pointed out, they're necessary for DIBs.

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