Saving Bitmap

  • Thread starter Thread starter Jonathan Chapman
  • Start date Start date
J

Jonathan Chapman

Hi,
I'm trying to save a monochrome bitmap using the "Save Bitmap Sample".
I was able to change the example to make it so that I can save a monochrome
bitmap. When I open the saved bitmap it works. However, if I try to save
the Bitmap again after opening an existing file, CreateDIBSection and BitBlt
return all zeros. There is no difference in the save between before and
after the load. If it is as the initial example (i.e. 16 or 24 bit) then
after a load the save works. Any insight into why this won't work.

Regards,
Jonathan
 
Thanks Sergey,
I actually wasn't using this example but I tried it and I still get the
same problem. It saves fine and loads fine. However if I press save after
loading an image then I get the black box when I load it back up. If I
press clear and then save I am fine. It looks like the loading of a bitmap
image does not influence the CreateDIBSection and BitBlt calls. Any ideas?

Regards,
Jonathan
Sergey Bogdanov said:
I assume you were using Save Image from:
http://www.sergeybogdanov.com/samples/SaveImage.zip

Not so long I've fixed few bugs maybe you may try it again. If it
wouldn't help, you can send me directly reproducible sample of your issue.


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Jonathan said:
Hi,
I'm trying to save a monochrome bitmap using the "Save Bitmap Sample".
I was able to change the example to make it so that I can save a monochrome
bitmap. When I open the saved bitmap it works. However, if I try to save
the Bitmap again after opening an existing file, CreateDIBSection and BitBlt
return all zeros. There is no difference in the save between before and
after the load. If it is as the initial example (i.e. 16 or 24 bit) then
after a load the save works. Any insight into why this won't work.

Regards,
Jonathan
 
Back
Top