PDA

View Full Version : Saving OpenGL scene from a VB PictureBox.hdc



stockton
03-27-2002, 01:49 AM
Hi

I am not entirly sure what I am doing but I have an OpenGL scene rendered in a VB PicturebBox. What I want to do is save the image as a BMP to a file. How do I do this?

Call SavePicture Picture1.Picture, "MyPicture.bmp")

The above code doesn't work.

Any Ideas?

Thanks

Simon

Pat
03-27-2002, 06:36 AM
I recommend using the Image source dll from www.smalleranimals.com (http://www.smalleranimals.com) for doing this type of thing. Of course it costs a couple of bucks, but it is pretty powerful.

You could also get the RGB pixel info. Then learn a about the BMP file format and do it manually. There are many sources on the web that detail the BMP fiel format.

Pat
03-27-2002, 06:48 AM
Check out http://www.kather.net/VisualBasicSource/VBTips/98.txt

Pat
03-27-2002, 06:51 AM
Have tried simply using the line

Picture1.Picture = Picture1.Image

before calling the SavePicture method?

Just a thought...