Issue 122395 - Position of transparent lines wrong after export to .PNG
Position of transparent lines wrong after export to .PNG
Status: RESOLVED FIXED
Product: Draw
Classification: Application
Component: save-export
4.0.0-dev
PC Windows 7
: P3 normal (vote)
: 4.0.0
Assigned To: AOO issues mailing list
: regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 05:22 UTC by Rainer Bielefeld
Modified: 2013-07-12 16:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
Sample Document (8.46 KB, application/vnd.oasis.opendocument.graphics)
2013-05-28 05:22 UTC, Rainer Bielefeld
no flags Details
Test Kit (10.98 KB, application/zip)
2013-05-29 17:59 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2013-05-28 05:22:50 UTC
Created attachment 80734 [details]
Sample Document

Steps how to reproduce with server installation of  "AOO 4.0.0-Dev – English UI / German locale [AOO400m2(Build:9701) -   Rev. 1485784 Rev.1485289 (2013-05-24)]" on WIN7 Home Premium (64bit)", Common 4.0 Trunk User Profile:

1. Open Sample document
2. In Slide 1 click second arrowhead line (in the middle) and apply 
   transparency 50% (using sidebar)
3. In Slide 1 click second normal horizontal line (in the middle) in the
   second lines group on the page and and apply 
   transparency 50% (using sidebar)
4. Menu 'File -> Export -> As PNG' <Export>
5. open export result in IrfanView or AOO
   Expected: line groups look as in source document
   Actual: transparent lines shifted down and to thee right

Additional info
---------------
a) was OK with 3.4.1, so regression
b) Already Reproducible  with server installation of  " AOO 4.0.0-Dev  – 
   English UI / German locale [AOO400m1(Build:9700) - Rev. 1457992 - Rev.1457606]" 
   on WIN7 Home Premium (64bit)", own separate user profile
c) gif, png, jpg export not affected
d) same with export all slide or selection
Comment 1 Armin Le Grand 2013-05-29 16:46:56 UTC
ALG: ?!? The sample document only contains a smiley.
Created two arrows, two hor lines, made a little big fatter, set 2nd arrow and line to 50% transparency. With no selection, exported as PNG. Opened in Paint.net, looks good. Perfect transparency and AAing.
BTW: You can now also just CTRL+C the shapes (no need to convert), CTRL+V in any paint app -> inserted as alpha- and AAed bitmap. The way back will of course create a bitmap in AOO, but also works as designed.

Please provide correct BugDoc if still reproducable.
Comment 2 Rainer Bielefeld 2013-05-29 17:59:42 UTC
Created attachment 80744 [details]
Test Kit

Source document and exportresult.png

Please excuse me, it seems I interchanged 2 sample documents
Comment 3 Armin Le Grand 2013-05-30 08:27:43 UTC
ALG: Checking with example document. Indeed this happens. Tried convert to bitmap, works. Tried copy-paste to draw app, works. export shows the error with and without checking 'export selection'. Looking deeper...
Comment 4 Armin Le Grand 2013-05-30 09:19:07 UTC
ALG: The export uses the UnoGraphicExporter in svx (class GraphicExporter). In both cases - export selection or export all - the exporter takes different execution paths, but both first convert the graphic content to export to a metafile. Then this put to a Graphic and from that a bitmap is fetched. In that step, the metafile is back-converted to primitives and then rendered.

Two problems:
(1) forth-and-back conversion is unnecessary, expensive and potentially loses information in the very complex transformatin between primitives and metafile (last but not least precision goes to integer due to metafile)

(2) This task uncovers an existing weakness in the conversion from primitives to metafile when a relative mapping and transparent objects are involved.

@rainerbielefeld: Thanks for finding this! (2) needs to be fixed and is a very good, general finding. For (1) I will write an enhancement task for after AOO4.0, this would be too dangerous right now.

Taking action on (2)...
Comment 5 Armin Le Grand 2013-05-30 09:30:50 UTC
ALG: Okay, (2) identified and adapted. Creating a task for (1)...
Comment 6 Armin Le Grand 2013-05-30 09:37:03 UTC
ALG: Wrote #122425# for (a). Checked in changes for (b), done.
Comment 7 SVN Robot 2013-05-30 09:42:00 UTC
"alg" committed SVN 0 into trunk:
i122395 Adapted mapping of content to more general way