Issue 122820 - exported image size ignores settings
Summary: exported image size ignores settings
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.1
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-07-24 13:19 UTC by Joe Smith
Modified: 2017-05-20 10:33 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 4.0.1_release_blocker+


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Joe Smith 2013-07-24 13:19:33 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 --
Comment 1 Edwin Sharp 2013-07-24 16:53:27 UTC
Drew a frame from basic shapes and exported.
According to XnView, width is 595 instead of 1800.

Rev. 1503704 Debian
Comment 2 Oliver-Rainer Wittmann 2013-08-09 12:53:29 UTC
I can confirm on my Windows 7 that this is an regression
Comment 3 Armin Le Grand 2013-08-30 15:54:56 UTC
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).
Comment 4 Armin Le Grand 2013-08-30 16:14:35 UTC
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...
Comment 5 Armin Le Grand 2013-08-30 16:41:51 UTC
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...
Comment 6 Armin Le Grand 2013-09-02 09:23:23 UTC
ALG: Works as expected and is for now the minimal change. Doing some more checks...
Comment 7 Armin Le Grand 2013-09-02 12:14:39 UTC
ALG: Tweaked and committed the minimal-invasive version. Requesting the flag for AOO401.
Comment 8 SVN Robot 2013-09-02 12:21:06 UTC
"alg" committed SVN revision 1519406 into trunk:
i122820 Corrected graphics creation, allow bigger limits if directly requested
Comment 9 jsc 2013-09-02 14:45:15 UTC
approve showstopper request
Comment 10 jsc 2013-09-03 09:10:04 UTC
set target
Comment 11 Armin Le Grand 2013-09-03 09:43:06 UTC
ALG: Added to AOO401, done.
Comment 12 SVN Robot 2013-09-03 10:01:41 UTC
"alg" committed SVN revision 1519619 into branches/AOO401:
i122820 Corrected graphics creation, allow bigger limits if directly requested