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. Downconverting froma 32-bit bitmap to a 4-bit bitmap

Downconverting froma 32-bit bitmap to a 4-bit bitmap

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestion
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.
  • T Offline
    T Offline
    TheDelChop
    wrote on last edited by
    #1

    I am trying to create a 4-bit bitmap from a 32-bit bitmap. Obviously this demands some sort of downcoversion from the 32-bit pixel values to the 4-bit values. I call GetDIBits with a PBITMIPINFO that is a 4-bit bitmap with a 16 color table. GetDIBits will do the downcoversion for me automatically right?

    M 1 Reply Last reply
    0
    • T TheDelChop

      I am trying to create a 4-bit bitmap from a 32-bit bitmap. Obviously this demands some sort of downcoversion from the 32-bit pixel values to the 4-bit values. I call GetDIBits with a PBITMIPINFO that is a 4-bit bitmap with a 16 color table. GetDIBits will do the downcoversion for me automatically right?

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      TheDelChop wrote:

      GetDIBits will do the downcoversion for me automatically right?

      Yes. I believe it creates the color table for you as well (based on the standard VGA palette according to the docs). This article may or may not help: How To Convert Between Device-Dependent Bitmaps and DIBs[^] Mark

      "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

      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