Reduce color of a bitmap

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Betschart Linus (linus[no-spam)
Date: 05/12/04


Date: Wed, 12 May 2004 11:46:14 +0200

Hello friends,

I have a problem, who not ;)

so I want to reduce the color depth of a bitmap.

I read here: http://www.dotnet247.com/247reference/msgs/29/147842.aspx that
it's just possible with GIF Files, but I am not quiet sure about this
statement, because, if i use this sample code:
http://support.microsoft.com/?id=319061 (but save as BMP and not as GIF), it
works!
My problem now is, that it saves just in grayscale, not in colour!
Can anyone help me?

thx a lot in advance
LB



Relevant Pages

  • Reduce color of a bitmap
    ... I want to reduce the color depth of a bitmap. ... it's just possible with GIF Files, but I am not quiet sure about this ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Display a CBitmap with CPaintDC class ...
    ... but when the bitmap doesn't have the same ... Nominally, if you start with a DIB, and select it into a memory DC, it should work. ... What is its color depth? ... Is the bitmap a DDB or DIB (Device Independent ...
    (microsoft.public.vc.mfc)
  • Re: problem: 256 color bitmaps in ImageList in 256 color mode
    ... the color depth of the ImageList_CreateAPI call in yours was ILC_COLOR32 ... and using LoadImagewith the LR_MONOCHROME flag for my mask bitmap fixed my ... >> LPARAM ... >> ImageList common control being used by my common control subclassed ...
    (microsoft.public.win32.programmer.ui)
  • Re: Using GetObject to extract icon color depth information?
    ... Is it possibly because GetObject returns me a DDB copy instead of a DIB? ... I need to use GetDIBits to extract that info? ... > GetObject to get a BITMAP structure returned. ... not the original color depth of the icon image. ...
    (microsoft.public.vb.winapi.graphics)
  • Re: Drawing correctly a Bitmap
    ... I have an image in memory (the color depth can be 8/16/24/32bits) and i need to display it correctly on screen but the color depth can be anything different So i've tried: ... // myBmp is the bitmap to display ... CBitmap *pOldBitmap; ... Only select it into the dcMemory (myBmp is the source bitmap, and has nothing to do with the destination). ...
    (microsoft.public.vc.mfc)