Bug 51233

Summary: Image is incorrectly resized if custom row height is set
Product: POI Reporter: Yegor Kozlov <yegor>
Component: SXSSFAssignee: POI Developers List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 55075    
Attachments: Test case for differences in image output for the formats HSSF, XSSF and SXSSF
Screenshot showing the difference in the files from XSSF and SXSSF

Description Yegor Kozlov 2011-05-19 12:24:25 UTC
Created attachment 27037 [details]
Test case for differences in image output for the formats HSSF, XSSF and SXSSF

In SXSSF the image appears vertically stretched. See discussion in Bug 51160
Comment 1 Dominik Stadler 2015-03-23 20:24:42 UTC
Created attachment 32595 [details]
Screenshot showing the difference in the files from XSSF and SXSSF

The difference is in the "to" element of the "twoCellAnchor" in xl/drawings/drawing1.xml as shown in the screenshot
Comment 2 Dominik Stadler 2015-03-23 20:49:46 UTC
The problem happens because XSSFDrawing() which is constructed via SXSSFSheet.createDrawingPatriarch() receives the XSSFSheet, not SXSSFSheet and thus getRow(0) returns null instead of the correct Row object, which later on causes different size calculations, e.g. in ImageUtils.getRowHeightInPixels()
Comment 3 Javen O'Neal 2016-10-09 08:52:59 UTC
The unit test from comment 0 and comment 1 will be combined with the patch from bug 55075.

*** This bug has been marked as a duplicate of bug 55075 ***