View Issue Details

IDProjectCategoryView StatusLast Update
0029184Open CASCADEOCCT:Visualizationpublic2018-06-29 21:19
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version7.2.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029184: Visualization - DrawWindow::Save() fails when using WinCodec with PNG codec
DescriptionDrawWindow::Save() dumps bitmap using BGR32 pixel format, which is not supported by PNG encoder in WinCodec.
Steps To Reproduce
pload MODELING
axo
box b 1 2 3
fit
xwd axo.png

Output:
Error: pixel format is unsupported by image format
TagsNo tags attached.
Test case numberNot required

Relationships

child of 0029055 closedbugmaster Visualization, Image_AlienPixMap - fallback using Wincodec 

Activities

git

2017-10-04 19:08

administrator   ~0071207

Branch CR29184 has been created by kgv.

SHA-1: eae157cfa4f97077d34245bb33545f9d6b2c0cdb


Detailed log of new commits:

Author: Zia ul Azam
Date: Wed Sep 13 17:12:57 2017 +0200

    0029184: Visualization - DrawWindow::Save() fails when using WinCodec with PNG codec

git

2017-10-04 22:10

administrator   ~0071213

Branch CR29184 has been updated forcibly by kgv.

SHA-1: 4570d778a86a3e751b3f1e6746ffa8226eaa3a8d

git

2017-10-04 22:11

administrator   ~0071215

Branch CR29184 has been updated forcibly by kgv.

SHA-1: ea62b9791f99a46497997cd74f5093a09f76de5f

kgv

2017-10-04 22:17

developer   ~0071217

Last edited: 2017-10-04 22:17

Patch is ready for review.

http://jenkins-test-10.nnov.opencascade.com/view/CR29184-master-KGV

Note that GetDIBits() is a little bit slower with Image_Format_BGR then Image_Format_BGR32, but considering extra alpha-zerroring code within Image_AlienPixMap::Save() for FreeImage+Image_Format_BGR32, there should not be much difference.

Image_Format_BGR32 can be used with WinCodec when saving BMP image, but not PNG.
Technically, Image_AlienPixMap::Save() should be improved with implicit pixel conversion logic, but this would require extra copies, and hence it is better using (and simpler for fixing) Image_Format_BGR for now.

abv

2017-10-04 22:49

manager   ~0071219

No remarks, please test

bugmaster

2017-10-05 13:15

administrator   ~0071233

Combination -
OCCT branch : CR29184 SHA-1: ea62b9791f99a46497997cd74f5093a09f76de5f
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.


Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
No differences that require special attention

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2017-10-14 12:20

administrator   ~0071480

Branch CR29184 has been deleted by kgv.

SHA-1: ea62b9791f99a46497997cd74f5093a09f76de5f

Related Changesets

occt: master 7c4ce93b

2017-09-13 15:12:57

kgv


Committer: bugmaster Details Diff
0029184: Visualization - DrawWindow::Save() fails when using WinCodec with PNG codec

DrawWindow::Save() now uses Image_Format_BGR instead of Image_Format_BGR32
for better compatibility with image encoders when dumping WinAPI bitmap.
Affected Issues
0029184
mod - src/Draw/Draw_Window.cxx Diff File

Issue History

Date Modified Username Field Change
2017-10-04 17:55 kgv New Issue
2017-10-04 17:55 kgv Assigned To => kgv
2017-10-04 17:57 kgv Steps to Reproduce Updated
2017-10-04 19:08 git Note Added: 0071207
2017-10-04 22:10 git Note Added: 0071213
2017-10-04 22:11 git Note Added: 0071215
2017-10-04 22:17 kgv Note Added: 0071217
2017-10-04 22:17 kgv Assigned To kgv => abv
2017-10-04 22:17 kgv Status new => resolved
2017-10-04 22:17 kgv Note Edited: 0071217
2017-10-04 22:18 kgv Relationship added child of 0029055
2017-10-04 22:49 abv Note Added: 0071219
2017-10-04 22:49 abv Assigned To abv => bugmaster
2017-10-04 22:49 abv Status resolved => reviewed
2017-10-05 13:15 bugmaster Note Added: 0071233
2017-10-05 13:15 bugmaster Status reviewed => tested
2017-10-06 14:55 bugmaster Changeset attached => occt master 7c4ce93b
2017-10-06 14:55 bugmaster Status tested => verified
2017-10-06 14:55 bugmaster Resolution open => fixed
2017-10-09 10:23 bugmaster Test case number => Not required
2017-10-14 12:20 git Note Added: 0071480
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed