Apache OpenOffice (AOO) Bugzilla – Issue 122395
Position of transparent lines wrong after export to .PNG
Last modified: 2022-10-28 12:54:29 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
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.
Created attachment 80744 [details] Test Kit Source document and exportresult.png Please excuse me, it seems I interchanged 2 sample documents
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...
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)...
ALG: Okay, (2) identified and adapted. Creating a task for (1)...
ALG: Wrote #122425# for (a). Checked in changes for (b), done.
"alg" committed SVN revision 1487800 into trunk: i122395 Adapted mapping of content to more general way