Bug 51233 - Image is incorrectly resized if custom row height is set
Summary: Image is incorrectly resized if custom row height is set
Status: RESOLVED DUPLICATE of bug 55075
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 55075
  Show dependency tree
 
Reported: 2011-05-19 12:24 UTC by Yegor Kozlov
Modified: 2016-10-09 08:52 UTC (History)
0 users



Attachments
Test case for differences in image output for the formats HSSF, XSSF and SXSSF (2.10 KB, application/octet-stream)
2011-05-19 12:24 UTC, Yegor Kozlov
Details
Screenshot showing the difference in the files from XSSF and SXSSF (50.58 KB, image/png)
2015-03-23 20:24 UTC, Dominik Stadler
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***