T
TEST
I am saving images out from a camera to bmp using directshow. I can open
these images in mspaint or any other image program without a problem.
Using:
HBITMAP h_Bitmap;
h_Bitmap = (HBITMAP)LoadImage(hInstance, L"C:\\DELETE\\1.bmp", IMAGE_BITMAP,
0, 0, LR_LOADFROMFILE);
h_Bitmap is staying null. GetLastError is returning 0. I can successfully
load a bitmap created with mspaint without a problem using the method above
so I have to think their is something extra inside the bitmap cauing issues.
Looking at the properties of a mspaint bitmap and the one I exported the
only differences I see is that Bit Depth is 32 for the camera and 24 for the
one using mspaint.
I can also load these bitmaps with managed code like
Bitmap obj_Bitmap1 = Bitmap::FromFile("C:\\DELETE\\1.bmp");
mobj_PictureBox->Image = Image::FromHbitmap(obj_Bitmap1.GetHbitmap());
which works fine. Any idea's why this would happen or how I can go about
fixing or finding out whats going on?
these images in mspaint or any other image program without a problem.
Using:
HBITMAP h_Bitmap;
h_Bitmap = (HBITMAP)LoadImage(hInstance, L"C:\\DELETE\\1.bmp", IMAGE_BITMAP,
0, 0, LR_LOADFROMFILE);
h_Bitmap is staying null. GetLastError is returning 0. I can successfully
load a bitmap created with mspaint without a problem using the method above
so I have to think their is something extra inside the bitmap cauing issues.
Looking at the properties of a mspaint bitmap and the one I exported the
only differences I see is that Bit Depth is 32 for the camera and 24 for the
one using mspaint.
I can also load these bitmaps with managed code like
Bitmap obj_Bitmap1 = Bitmap::FromFile("C:\\DELETE\\1.bmp");
mobj_PictureBox->Image = Image::FromHbitmap(obj_Bitmap1.GetHbitmap());
which works fine. Any idea's why this would happen or how I can go about
fixing or finding out whats going on?