Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

WinCE C++ Color BMP to 4bit ?

Hello

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!!

Sven
0
Ruttensoft
Asked:
Ruttensoft
1 Solution
 
RuttensoftAuthor Commented:
I found this code here:

http://www.codeproject.com/bitmap/BitmapFromScreen.asp

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...
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now