View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021985 | Community | OCCT:Visualization | public | 2010-08-26 18:14 | 2013-04-29 15:21 |
Reporter | Assigned To | ||||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | Windows NT | ||||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0021985: Vista/WIndows 7 compatibility issues reported by the community | ||||
Description | There are several compatibility issues reported by the community for OCCT visualization component. 1. OCC 6.3.1 Windows7 bug ************************************************* In order to be able to load one of our OCC based DLL’s in Windows 7, we needed to modify src\Graphic3d\Graphic3d_WNTGraphicDevice.cxx. Around line 51 we changed: Standard_CString TheShr = getenv("CSF_GraphicShr"); if ( ! TheShr ) TheShr = "TKOpenGl.dll"; Into: Standard_CString TheShr = getenv("CSF_GraphicShr"); if ( ! TheShr || (strcmp(TheShr,"")==0) ) TheShr = "TKOpenGl.dll"; ************************************************* SAN: I believe strlen(TheShr) == 0 is a more natural way to check for an empty string. 2. About compatibility with Windows 7 ************************************************* I have now compiled under Windows 7, using OpenCascade 6.3.0 I have noticed the following problem: The function WNT_Window:: Dump does not work correctly. This function is used in the MFC standard example 01_Geometry, where it is called from menu option File>>Export>>Image... The problem is that instead of the correct image of the drawing window it produces an empty grey image. The same problem exists in Windows Vista. There is no problem for Windows XP. ************************************************* SAN: In order to approach the problem, it is necessary to revise all OCCT API methods related to 2D/3D scene dump creation and eliminate duplicated functionality (if any) in WNT/Xw/OpenGl packages, keeping e.g. only the following imlementations (to be discussed): - Reading window pixels directly. - Redrawing window contents to an off-screen bitmap (suitable for non-OpenGL scene only!). - Redrawing OpenGL scene contents to a framebuffer object (FBO) and reading its data. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
2010-08-27 10:53
|
psn_OCC21985_v1_1.tar (10,240 bytes) |
|
As of OCCT 6.5.2: point 1 is fixed, point 2 is still there |
|
Dear aba, Could you, please, review OCCT samples and replace all occurrences of WNT_Window::Dump() with V3d_View::ToPixMap() calls? |
|
In OCCT samples with 3d visualization all WNT_Window::Dump method calls were replaced with V3dView::Dump method calls. In 2d visualization OCCT sample Viewer2d in OCC_2dView.cpp WNT_Window::Dump method call wasn't replaced. The methods WNT_Window::Dump and V3dView::Dump were checked: OnFileExportImage() message handlers provide possibility to export models in files with .bmp, .gif and .xwd extensions, but during image saving (in Image_AlienPixMap::Save method) FreeImage_GetFIFFromFilename method recognizes .xwd extension as FIF_UNKNOWN and therefore it isn't possible to export in .xwd file. The Git branch CR21985 is ready to be reviewed. Dear san. please review. |
|
Branch CR21985 reviewed with the following remark. Modified files: samples/mfc/standard/01_Geometry/src/GeometryView.cpp samples/mfc/standard/09_Animation/src/AnimationView3D.cpp samples/mfc/standard/Common/OCC_3dView.cpp now contain the same line: myView->Dump((Standard_CString)(LPCTSTR)filename); C-style casting to Standard_CString from LPCTSTR that can point to a Unicode string if UNICODE is defined is unsafe. KGV suggests removing both casts: myView->Dump(filename); In such a case compiler will inform a developer if an attempt to pass a Unicode string to non-Unicode function is being made. Otherwise, corrupted Unicode data will be passed as a regular C-style string to V3d_View::Dump() method. |
|
The Git branch CR21985 was updated. Casts to LPCTSTR and Standard_CString were removed. Dear san, please review. |
|
Dear aba, In file OCC_3dView.cpp, 155-182: > filter = _T("BMP Files (*.BMP)|*.bmp|GIF Files (*.GIF)|*.gif|XWD Files >(*.XWD)|*.xwd|PS Files (*.PS)|*.ps|EPS Files (*.EPS)|*.eps|TEX Files >(*.TEX)|*.tex|PDF Files (*.PDF)|*.pdf|SVG Files (*.SVG)|*.svg|PGF Files >(*.PGF)|*.pgf||"); > ... > char* theFile = new char[filename.GetLength()+1]; > //_tcscpy(theFile,filename); > strcpy_s(theFile,filename.GetLength()+1,filename); > CString ext = dlg.GetFileExt(); > if (ext == "ps" || ext == "emf") > { It seems that this extension detection is incomplete: - SetCursor() is not called within Export() scenario. - Export function should be used for extensions PS, EPS, TEX, PDF, SVG, PGF, EMF. - String comparison should be case-insensitive. - theFile variable looks redundant here. Also: - Please rename "filename" variable to "aFileName". File AnimationView3D.cpp, 241-244 and GeometryView.cpp, 80-83, OCC_3dView.cpp: >void CAnimationView3D::OnFileExportImage() >{ > CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | > OFN_OVERWRITEPROMPT, _T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif >| XWD Files (*.XWD)|*.xwd||"), NULL ); Please extend list of supported extensions (based on FreeImage). |
|
Just a question to everybody: is the list of supported export image file formats documented anywhere? Or should one check vdump DRAW command of FreeImage headers each time? Is not it worth adding this information to Image_AlienPixMap.hxx? |
|
Dear aba, please add information about following supported formats to Image_AlienPixMap documentation and use it in the samples (notice that there are no XWD format): *.bmp - bitmap image, lossless format without compression. *.ppm - PPM (Portable Pixmap Format), lossless format without compression. *.png - PNG (Portable Network Graphics) lossless format with compression. *.jpg, *.jpe, *.jpeg - JPEG/JIFF (Joint Photographic Experts Group) lossy format (compressed with quality losses). YUV color space used (automatically converted from/to RGB). *.tif, *.tiff - TIFF (Tagged Image File Format). *.tga - TGA (Truevision Targa Graphic), lossless format. *.gif - GIF (Graphical Interchange Format), lossy format. Color stored using pallete (up to 256 distinct colors). *.exr - OpenEXR high dynamic-range format (supports float pixel formats). |
|
The Git granch CR21985 was modified. In files OCC_3dView.cpp, AnimationView3D.cpp and GeometryView.cpp: 1)in OnFileExportImage() methods lists of supported extensions were extended according to FreeImage supported image formats. 2)'filename' variable was renamed to 'aFileName' In OCC_3dView.cpp: 1)In Export() function is used for PS, EPS, TEX, PDF, SVG, PGF and EMF extensions. 2)In condition checking supported for Export() function formats case-insensitive string comparison was added. 3) 'theFile' variable was removed, and the only 'aFileName' variable is used for both Export() and Dump() methods Please review. |
|
Branch CR21985 reviewed without remarks, ready for testing. |
|
Dear bugmaster, Why this issue is suspended? Note that it has been waiting for testing for two weeks. |
|
Dear aba, Could you please update the supported image file types and file filters for 2D viewer samples, too? |
|
The supported image file filter for 2d samples in OCC_2dView::OnFileExportImage() method was extended with formats supported by FreeImage (bmp, gif, png, jpeg, ppm, tiff, tga, exr). The Git branch CR21985 was updated. Dear san, please review. |
|
Branch CR21985 reviewed without remarks, ready for testing. |
occt: master 3994ec41 2012-12-07 10:21:46
|
0021985: Vista/WIndows 7 compatibility issues reported by the community WNT_Window::Dump method calls were replaced with V3dView::Dump calls Type casts were removed Added supported image formats in file filters of Export methods, edited documentation for Image_AlienPixMap class Supported image formats filter for 2dsample was extended |
Affected Issues 0021985 |
|
mod - samples/mfc/standard/01_Geometry/src/GeometryView.cpp | Diff File | ||
mod - samples/mfc/standard/09_Animation/src/AnimationView3D.cpp | Diff File | ||
mod - samples/mfc/standard/Common/OCC_2dView.cpp | Diff File | ||
mod - samples/mfc/standard/Common/OCC_3dView.cpp | Diff File | ||
mod - src/Image/Image_AlienPixMap.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-08-26 19:06 |
|
CC | => psn |
2010-08-27 10:58 | bugmaster | Assigned To | bugmaster => psn |
2010-08-27 10:58 | bugmaster | Status | new => assigned |
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2012-01-13 15:53 |
|
Project | Open CASCADE => Community |
2012-02-06 08:24 |
|
Note Added: 0019400 | |
2012-10-23 11:25 |
|
Assigned To | psn => |
2012-10-23 11:25 |
|
Fixed in Version | EMPTY => |
2012-10-23 11:25 |
|
Target Version | => Unscheduled |
2012-10-23 11:25 |
|
Description Updated | |
2012-11-13 20:19 |
|
Assigned To | => abdelrazzak |
2012-11-13 20:19 |
|
Assigned To | abdelrazzak => aba |
2012-11-14 15:29 |
|
Note Added: 0022240 | |
2012-11-15 11:38 |
|
Note Added: 0022256 | |
2012-11-15 11:38 |
|
Assigned To | aba => san |
2012-11-15 11:38 |
|
Status | assigned => resolved |
2012-11-15 19:08 |
|
Note Added: 0022273 | |
2012-11-15 19:08 |
|
Assigned To | san => aba |
2012-11-15 19:08 |
|
Status | resolved => assigned |
2012-11-20 10:53 |
|
Note Added: 0022303 | |
2012-11-20 10:54 |
|
Assigned To | aba => san |
2012-11-20 10:54 |
|
Status | assigned => resolved |
2012-11-20 15:40 | kgv | Note Added: 0022311 | |
2012-11-20 15:40 | kgv | Assigned To | san => aba |
2012-11-20 15:40 | kgv | Status | resolved => assigned |
2012-11-21 10:48 |
|
Note Added: 0022321 | |
2012-11-21 11:33 | kgv | Note Added: 0022325 | |
2012-11-21 18:53 |
|
Note Added: 0022336 | |
2012-11-21 18:53 |
|
Assigned To | aba => san |
2012-11-21 18:53 |
|
Status | assigned => resolved |
2012-11-21 21:40 |
|
Note Added: 0022337 | |
2012-11-21 21:40 |
|
Assigned To | san => bugmaster |
2012-11-21 21:40 |
|
Status | resolved => reviewed |
2012-12-05 11:09 |
|
Note Added: 0022561 | |
2012-12-05 11:09 |
|
Status | reviewed => feedback |
2012-12-05 11:15 | kgv | Target Version | Unscheduled => 6.6.0 |
2012-12-05 16:36 |
|
Note Added: 0022571 | |
2012-12-05 16:36 |
|
Status | feedback => assigned |
2012-12-05 16:36 |
|
Assigned To | bugmaster => aba |
2012-12-05 17:32 |
|
Note Added: 0022575 | |
2012-12-05 17:33 |
|
Assigned To | aba => san |
2012-12-05 17:33 |
|
Status | assigned => resolved |
2012-12-06 15:28 |
|
Note Added: 0022593 | |
2012-12-06 15:28 |
|
Assigned To | san => bugmaster |
2012-12-06 15:28 |
|
Status | resolved => reviewed |
2012-12-07 14:21 | bugmaster | Status | reviewed => tested |
2012-12-10 17:16 |
|
Changeset attached | => occt master 3994ec41 |
2012-12-10 17:16 |
|
Assigned To | bugmaster => aba |
2012-12-10 17:16 |
|
Status | tested => verified |
2012-12-10 17:16 |
|
Resolution | open => fixed |
2013-04-23 13:37 |
|
Status | verified => closed |
2013-04-29 15:21 |
|
Fixed in Version | => 6.6.0 |