Apache OpenOffice (AOO) Bugzilla – Issue 122820
exported image size ignores settings
Last modified: 2017-05-20 10:33:49 UTC
File > New > Drawing (Insert some object) File > Export > File format: PNG; selection: NO/OFF Click "Export" -- "PNG Options" dialog opens Size > Width: 1800 Click OK Expect exported image to be 1800 pixels wide Actual width is 970: $ file test_export.png test_export.png: PNG image data, 970 x 515, 8-bit/color RGBA, non-interlaced The export works correctly in 3.4.1; also seems correct exporting JPEG format. -- REGRESSION --
Drew a frame from basic shapes and exported. According to XnView, width is 595 instead of 1800. Rev. 1503704 Debian
I can confirm on my Windows 7 that this is an regression
ALG: Reason is that the converter doing the conversion has a quadratic pixel limit to not blast memory when for some reason (errors?) too big bitmap sizes come along; this limit is currently defaulted to 500.000 pixels. Also checking other conversions, (e.g. use selection) or non-transparent (which creates not the exact pixel size eventually, correct this, too).
ALG: Exporting possible combinations to a width of 1800 pixel: Export PNG: Single object, not selection: Okay Single object, selection: Okay Multiple objects, not selection: Okay Multiple objects, selection: Okay Export BMP (no transparency): Single object, not selection: Okay Single object, selection: One pixel wider than wanted (?) Multiple objects, not selection: Okay Multiple objects, selection: One pixel wider than wanted (?) Checking for BMP, selection...
ALG: COmes from the mechanism in ImpGraphic::ImplGetBitmap which will expand by one in X and Y when the to-be-converted metafile has hairlines; background is that these will be lost on bottom and right when drawn normally. Added support to GetBitmapFromMetaFile in GraphicExporter; this will give the requested sizea dn preserve the lines. Testing...
ALG: Works as expected and is for now the minimal change. Doing some more checks...
ALG: Tweaked and committed the minimal-invasive version. Requesting the flag for AOO401.
"alg" committed SVN revision 1519406 into trunk: i122820 Corrected graphics creation, allow bigger limits if directly requested
approve showstopper request
set target
ALG: Added to AOO401, done.
"alg" committed SVN revision 1519619 into branches/AOO401: i122820 Corrected graphics creation, allow bigger limits if directly requested