Problem Creating a Bitmap using ToPixMap() followed by Dump()

I'm in the process of porting from 6.2.0 to 6.5.3. I'm developing on Windows 7.

In the old version, I had been using ToPixMap() to capture an image of my current view ( at a higher resolution so it would look good on a printer. ) I would then use Aspect_PixMap::Dump() to save it to a bitmap file.

In 6.5.3 this is no longer working. Dump() still returns true, indicating success, and a .bmp file is created, and appears to be about the right size. However, any program I use to view the bitmap fails to open it, saying the file is corrupt.

Anyone have any idea what I'm doing wrong? Any help would be greatly appreciated!

EricThompson's picture

I've figured out what the issue is. In the old version, the dump produced a bitmap image file. In the new version, if you don't have FreeImage, the image file format is a binary .PPM file.

Given the choice between changing my install to include FreeImage, or changing my OpenCascade code to write out a bitmap, I'm going to write out a bitmap.