Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

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

Problem Creating a Bitmap using ToPixMap() followed by Dump()
EricThompson 2012/08/01 00:14
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 2012/08/02 23:24
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.
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map