Hi,
I have writing the code for change the Palette color of the Bitmap. But I didn't get any different between given image and result image.
Here I given my code,
Bitmap *bmp=new Bitmap(L"skumar 3.bmp");
INT size = bmp->GetPaletteSize ();// bitmap->GetPaletteSize ();
printf("The size of the palette is %d bytes.\n", size);
ColorPalette* palette = (ColorPalette*) malloc(size);
bmp->GetPalette(pal ette, size);
for (int index = 0; index < 255; index++)
{
palette->Entries[index]= Color::MakeARGB (255,index ,index ,index );
}
bmp->SetPalette(pal ette);
bmp->Save(L"skumar4 .bmp", &guidBmp);
Please Help me to solve this problem.
I have writing the code for change the Palette color of the Bitmap. But I didn't get any different between given image and result image.
Here I given my code,
Bitmap *bmp=new Bitmap(L"skumar 3.bmp");
INT size = bmp->GetPaletteSize ();// bitmap->GetPaletteSize ();
printf("The size of the palette is %d bytes.\n", size);
ColorPalette* palette = (ColorPalette*) malloc(size);
bmp->GetPalette(pal ette, size);
for (int index = 0; index < 255; index++)
{
palette->Entries[index]= Color::MakeARGB (255,index ,index ,index );
}
bmp->SetPalette(pal ette);
bmp->Save(L"skumar4 .bmp", &guidBmp);
Please Help me to solve this problem.
Comment