MantisBT - Open CASCADE
View Issue Details
0030946Open CASCADE[OCCT] OCCT:Visualizationpublic2019-09-05 13:572019-09-16 14:10
kgv 
abv 
normalminor 
verifiedfixed 
[OCCT] 6.5.4 
[OCCT] 7.4.0 
bugs/vis/bug30946
0030946: Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage
Image_AlienPixMap implementation does not check bits-per-pixel value for black/white formats leading to broken pixmap being initialized.
bugs/vis/bug30946
No tags attached.
related to 0030782verified bugmaster Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets 
child of 0023272closed kgv Image comparison algorithm 
png img_1bit_32px.png (217) 2019-09-05 14:10
https://tracker.dev.opencascade.org/
png img_1bit_256px.png (804) 2019-09-05 14:10
https://tracker.dev.opencascade.org/
png draw_1bit_KO.png (6,323) 2019-09-05 14:10
https://tracker.dev.opencascade.org/
png bug30946_img_1bit_32px.png (217) 2019-09-10 16:51
https://tracker.dev.opencascade.org/
png bug30946_img_1bit_256px.png (804) 2019-09-10 16:51
https://tracker.dev.opencascade.org/
Issue History
2019-09-05 13:57kgvNew Issue
2019-09-05 13:57kgvAssigned To => kgv
2019-09-05 14:09kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21755#r21755
2019-09-05 14:10kgvFile Added: img_1bit_32px.png
2019-09-05 14:10kgvFile Added: img_1bit_256px.png
2019-09-05 14:10kgvAssigned Tokgv => mzernova
2019-09-05 14:10kgvStatusnew => assigned
2019-09-05 14:10kgvFile Added: draw_1bit_KO.png
2019-09-05 14:12kgvRelationship addedrelated to 0030782
2019-09-05 14:12kgvNote Added: 0086794
2019-09-10 16:51mzernovaFile Added: bug30946_img_1bit_32px.png
2019-09-10 16:51mzernovaFile Added: bug30946_img_1bit_256px.png
2019-09-10 17:30gitNote Added: 0086993
2019-09-10 17:38kgvNote Added: 0086994
2019-09-10 17:46mzernovaNote Added: 0086997
2019-09-10 17:46mzernovaAssigned Tomzernova => osa
2019-09-10 17:46mzernovaStatusassigned => resolved
2019-09-10 17:46mzernovaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21807#r21807
2019-09-11 12:27gitNote Added: 0087002
2019-09-13 11:08kgvNote Added: 0087037
2019-09-13 11:08kgvAssigned Toosa => mzernova
2019-09-13 11:08kgvStatusresolved => assigned
2019-09-13 11:08kgvTarget Version7.5.0* => 7.4.0
2019-09-13 15:37gitNote Added: 0087065
2019-09-13 15:42mzernovaNote Added: 0087067
2019-09-13 15:42mzernovaAssigned Tomzernova => osa
2019-09-13 15:42mzernovaStatusassigned => resolved
2019-09-13 17:00osaAssigned Toosa => bugmaster
2019-09-13 17:00osaStatusresolved => reviewed
2019-09-13 20:57bugmasterTest case number => bugs/vis/bug30946
2019-09-13 21:04bugmasterNote Added: 0087076
2019-09-13 21:04bugmasterStatusreviewed => tested
2019-09-15 10:51abvChangeset attached => occt master fdae2107
2019-09-15 10:51abvAssigned Tobugmaster => abv
2019-09-15 10:51abvStatustested => verified
2019-09-15 10:51abvResolutionopen => fixed
2019-09-15 10:54gitNote Added: 0087087
2019-09-15 10:55gitNote Added: 0087097
2019-09-16 14:10kgvRelationship addedchild of 0023272
2019-09-16 14:10kgvProduct Version7.3.0 => 6.5.4

Notes
(0086794)
kgv   
2019-09-05 14:12   
Similar bug has been recently fixed within Font_FTFont::RenderGlyph() with FT_PIXEL_MODE_MONO format.
(0086993)
git   
2019-09-10 17:30   
Branch CR30946 has been created by mzernova.

SHA-1: 452b5751435075c1194b9aaf51ac80326b6f1b91


Detailed log of new commits:

Author: mzernova
Date: Tue Sep 10 17:10:25 2019 +0300

    0030946: Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage
    
    Added check of bits-per-pixel value and conversion from 1-bit images to 8-bit images
(0086994)
kgv   
2019-09-10 17:38   
+  if (FreeImage_GetBPP (anImage) == 1)
+  {
+    anImage = FreeImage_ConvertTo8Bits (anImage);
+  }

Looks like a memory leak.
(0086997)
mzernova   
2019-09-10 17:46   
The patch CR30946 is ready to review
(0087002)
git   
2019-09-11 12:27   
Branch CR30946 has been updated by mzernova.

SHA-1: 6590929077203b28c3e099a83aa60f31016c95ea


Detailed log of new commits:

Author: mzernova
Date: Wed Sep 11 12:19:30 2019 +0300

    #remarks from osa

(0087037)
kgv   
2019-09-13 11:08   
Please switch to RESOLVED when patch will be ready for review.
Note that a new branch with squashed commits is expected for integration.
(0087065)
git   
2019-09-13 15:37   
Branch CR30946_1 has been created by mzernova.

SHA-1: 65ba44feb02efb259c2b92fb5c6eacdc024a42dc


Detailed log of new commits:

Author: mzernova
Date: Tue Sep 10 17:10:25 2019 +0300

    0030946: Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage
    
    Convert 1-bit image to 8-bit one during its loading because only greyscale images are supported by visualization
(0087067)
mzernova   
2019-09-13 15:42   
The patch CR30946 is ready to review
(0087076)
bugmaster   
2019-09-13 21:04   
Combination -
OCCT branch : CR30946
master SHA - 6590929077203b28c3e099a83aa60f31016c95ea
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : master SHA - f9d0bd5e3a29d6a97b3f5f6354ea2397253ab4f8
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16782.080000000005 / 16801.83000000017 [-0.12%]
Products
Total CPU difference: 10546.910000000033 / 10553.510000000031 [-0.06%]
Windows-64-VC14:
OCCT
Total CPU difference: 18219.390625 / 18249.640625 [-0.17%]
Products
Total CPU difference: 12379.375 / 12227.453125 [+1.24%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0087087)
git   
2019-09-15 10:54   
Branch CR30946_1 has been deleted by inv.

SHA-1: 65ba44feb02efb259c2b92fb5c6eacdc024a42dc
(0087097)
git   
2019-09-15 10:55   
Branch CR30946 has been deleted by inv.

SHA-1: 6590929077203b28c3e099a83aa60f31016c95ea