View Issue Details

IDProjectCategoryView StatusLast Update
0030946Open CASCADEOCCT:Visualizationpublic2019-11-06 23:57
Reporterkgv Assigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.5.4 
Target Version7.4.0Fixed in Version7.4.0 
Summary0030946: Visualization - Image_AlienPixMap ignores 1-bit pixelformat when using FreeImage
DescriptionImage_AlienPixMap implementation does not check bits-per-pixel value for black/white formats leading to broken pixmap being initialized.
Steps To Reproducebugs/vis/bug30946
TagsNo tags attached.
Test case numberbugs/vis/bug30946

Attached Files

  • img_1bit_32px.png (217 bytes)
  • img_1bit_256px.png (804 bytes)
  • draw_1bit_KO.png (6,323 bytes)
  • bug30946_img_1bit_32px.png (217 bytes)
  • bug30946_img_1bit_256px.png (804 bytes)

Relationships

related to 0030782 closedbugmaster Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets 
related to 0031138 closedbugmaster Visualization - Image_AlienPixMap fails to load PNG image with palette 
child of 0023272 closedkgv Image comparison algorithm 

Activities

kgv

2019-09-05 14:10

developer  

img_1bit_32px.png (217 bytes)

kgv

2019-09-05 14:10

developer  

img_1bit_256px.png (804 bytes)

kgv

2019-09-05 14:10

developer  

draw_1bit_KO.png (6,323 bytes)

kgv

2019-09-05 14:12

developer   ~0086794

Similar bug has been recently fixed within Font_FTFont::RenderGlyph() with FT_PIXEL_MODE_MONO format.

user897

2019-09-10 16:51

 

bug30946_img_1bit_32px.png (217 bytes)

user897

2019-09-10 16:51

 

bug30946_img_1bit_256px.png (804 bytes)

git

2019-09-10 17:30

administrator   ~0086993

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

kgv

2019-09-10 17:38

developer   ~0086994

+  if (FreeImage_GetBPP (anImage) == 1)
+  {
+    anImage = FreeImage_ConvertTo8Bits (anImage);
+  }

Looks like a memory leak.

user897

2019-09-10 17:46

  ~0086997

The patch CR30946 is ready to review

git

2019-09-11 12:27

administrator   ~0087002

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

kgv

2019-09-13 11:08

developer   ~0087037

Please switch to RESOLVED when patch will be ready for review.
Note that a new branch with squashed commits is expected for integration.

git

2019-09-13 15:37

administrator   ~0087065

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

user897

2019-09-13 15:42

  ~0087067

The patch CR30946 is ready to review

bugmaster

2019-09-13 21:04

administrator   ~0087076

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

git

2019-09-15 10:54

administrator   ~0087087

Branch CR30946_1 has been deleted by inv.

SHA-1: 65ba44feb02efb259c2b92fb5c6eacdc024a42dc

git

2019-09-15 10:55

administrator   ~0087097

Branch CR30946 has been deleted by inv.

SHA-1: 6590929077203b28c3e099a83aa60f31016c95ea

Related Changesets

occt: master fdae2107

2019-09-10 14:10:25

abv


Committer: abv Details Diff
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
Affected Issues
0030946
mod - src/Image/Image_AlienPixMap.cxx Diff File
add - tests/bugs/vis/bug30946 Diff File

Issue History

Date Modified Username Field Change
2019-09-05 13:57 kgv New Issue
2019-09-05 13:57 kgv Assigned To => kgv
2019-09-05 14:09 kgv Steps to Reproduce Updated
2019-09-05 14:10 kgv File Added: img_1bit_32px.png
2019-09-05 14:10 kgv File Added: img_1bit_256px.png
2019-09-05 14:10 kgv Assigned To kgv => user897
2019-09-05 14:10 kgv Status new => assigned
2019-09-05 14:10 kgv File Added: draw_1bit_KO.png
2019-09-05 14:12 kgv Relationship added related to 0030782
2019-09-05 14:12 kgv Note Added: 0086794
2019-09-10 16:51 user897 File Added: bug30946_img_1bit_32px.png
2019-09-10 16:51 user897 File Added: bug30946_img_1bit_256px.png
2019-09-10 17:30 git Note Added: 0086993
2019-09-10 17:38 kgv Note Added: 0086994
2019-09-10 17:46 user897 Note Added: 0086997
2019-09-10 17:46 user897 Assigned To user897 => osa
2019-09-10 17:46 user897 Status assigned => resolved
2019-09-10 17:46 user897 Steps to Reproduce Updated
2019-09-11 12:27 git Note Added: 0087002
2019-09-13 11:08 kgv Note Added: 0087037
2019-09-13 11:08 kgv Assigned To osa => user897
2019-09-13 11:08 kgv Status resolved => assigned
2019-09-13 11:08 kgv Target Version 7.5.0 => 7.4.0
2019-09-13 15:37 git Note Added: 0087065
2019-09-13 15:42 user897 Note Added: 0087067
2019-09-13 15:42 user897 Assigned To user897 => osa
2019-09-13 15:42 user897 Status assigned => resolved
2019-09-13 17:00 osa Assigned To osa => bugmaster
2019-09-13 17:00 osa Status resolved => reviewed
2019-09-13 20:57 bugmaster Test case number => bugs/vis/bug30946
2019-09-13 21:04 bugmaster Note Added: 0087076
2019-09-13 21:04 bugmaster Status reviewed => tested
2019-09-15 10:51 abv Changeset attached => occt master fdae2107
2019-09-15 10:51 abv Assigned To bugmaster => abv
2019-09-15 10:51 abv Status tested => verified
2019-09-15 10:51 abv Resolution open => fixed
2019-09-15 10:54 git Note Added: 0087087
2019-09-15 10:55 git Note Added: 0087097
2019-09-16 14:10 kgv Relationship added child of 0023272
2019-09-16 14:10 kgv Product Version 7.3.0 => 6.5.4
2019-11-06 23:57 kgv Relationship added related to 0031138