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
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
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()
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 ***