Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Bitmaps, device dependent vs device independent, which is faster (or better)?

Bitmaps, device dependent vs device independent, which is faster (or better)?

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiocomgraphicsbeta-testing
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 15078716
    wrote on last edited by
    #1

    I am working at blitting to back frame buffers a changing variety of bitmaps to create animations. When completed, that would be sent to the screen. I want to do this with minimum processing and minimum RAM. Svetoslav Chekanov, on another page Fast 2:1 Image Shrink (Scale Down)[^] said,

    Quote:

    Device dependent format is blitted faster to the screen.

    I did not know that. I have been using Device Independent because it seemed to be easier to work with. I will now consider this Dependent vs Independent. I found a discussion with some interesting observations. C++ Windows API: Is there any alternative of the SetDIBits for device-dependent Bitmap?[^] In that I found:

    Quote:

    The difference is insignificant, more than swamped by the time it takes to copy the bitmap to the frame buffer.

    May I have some feedback on this "is insignificant" comment (from the Windows API link) if it is correct or not? I also read on that page,

    Quote:

    In a DIB, each scanline is always a multiple of 4 bytes. In a 24-bit DIB, that means you will have extra padding bytes unless the width is a multiple of 4.

    I did not know that. I will now have that to consider. Looking forward to learning more about this.

    CPalliniC 1 Reply Last reply
    0
    • M Member 15078716

      I am working at blitting to back frame buffers a changing variety of bitmaps to create animations. When completed, that would be sent to the screen. I want to do this with minimum processing and minimum RAM. Svetoslav Chekanov, on another page Fast 2:1 Image Shrink (Scale Down)[^] said,

      Quote:

      Device dependent format is blitted faster to the screen.

      I did not know that. I have been using Device Independent because it seemed to be easier to work with. I will now consider this Dependent vs Independent. I found a discussion with some interesting observations. C++ Windows API: Is there any alternative of the SetDIBits for device-dependent Bitmap?[^] In that I found:

      Quote:

      The difference is insignificant, more than swamped by the time it takes to copy the bitmap to the frame buffer.

      May I have some feedback on this "is insignificant" comment (from the Windows API link) if it is correct or not? I also read on that page,

      Quote:

      In a DIB, each scanline is always a multiple of 4 bytes. In a 24-bit DIB, that means you will have extra padding bytes unless the width is a multiple of 4.

      I did not know that. I will now have that to consider. Looking forward to learning more about this.

      CPalliniC Online
      CPalliniC Online
      CPallini
      wrote on last edited by
      #2

      Well, they claim the device independent one are faster (Bitmap Classifications - Win32 apps | Microsoft Learn[^]. You could arrange a test in order to have experimental evidence.

      "In testa che avete, Signor di Ceprano?" -- Rigoletto

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups