WinCE C++ Color BMP to 4bit ?

Posted on 2007-10-09
Last Modified: 2013-12-27

I have a colored BMP (in bytes) which I want to convert to a 4bit monochrom bitmap.

I can do it in .NET CF, but it's slow.

I'm very new to C++, could anyone post a small DLL code in eVC++ which can do that?
It has to be in C++ for Windows CE

I would even paypal you some $ :-)

Thanks a lot!!

Question by:Ruttensoft

    Author Comment

    I found this code here:

    Which lets me convert a bmp to a 4bit colored bmp.

    After changing the color palette to:

         static RGBQUAD rgb [16] =     {0x00, 0x00, 0x00, 0x00,
        0x14, 0x14, 0x14, 0x00,
        0x20, 0x20, 0x20, 0x00,
        0x2c, 0x2c, 0x2c, 0x00,
        0x38, 0x38, 0x38, 0x00,
        0x45, 0x45, 0x45, 0x00,
        0x51, 0x51, 0x51, 0x00,
        0x61, 0x61, 0x61, 0x00,
        0x71, 0x71, 0x71, 0x00,
        0x82, 0x82, 0x82, 0x00,
        0x92, 0x92, 0x92, 0x00,
        0xa2, 0xa2, 0xa2, 0x00,
        0xb6, 0xb6, 0xb6, 0x00,
        0xcb, 0xcb, 0xcb, 0x00,
        0xe3, 0xe3, 0xe3, 0x00,
        0xff, 0xff, 0xff, 0x00}

    I get a 4 bit monochrom bitmap as I wanted.

    Now I think most of the code that will be needed to create a eVC++-DLL is in this project, but I dont know how to built it...
    LVL 48

    Accepted Solution


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
    In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
    The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now