how to get image from PictureBox with Format8bppRgb?? becouse this function return Format24bppRgb:
Bitmap ^getBitmap8() {
Bitmap ^tmpBmp = gcnew Bitmap(pictureBox1->Image->Width, pictureBox1->Image->Height, System::Drawing::Imaging::PixelFormat::Format8bppIndexed);
tmpBmp = dynamic_cast<Bitmap^>(pictureBox1->Image); <- this one change PixelFormat from 8 to 24bpp
Rectangle rec = Rectangle(0,0,tmpBmp->Width, tmpBmp->Height);
tmpBmp->Clone(rec, System::Drawing::Imaging::PixelFormat::Format8bppIndexed); <- this one doesn't work
return tmpBmp;
}
help, i need to return Bitmap tmpBmp with Format8bppRGB to use aFormge filter.
ok, i've just solved the problem. If someone needs: