Description: missing borders on export of selection to png Steps to Reproduce: 1. open document 2. select image 3. export, select "selection", export to png Actual Results: missing right/bottom borders https://bz.apache.org/ooo/show_bug.cgi?id=122820 is similar Expected Results: borders visible in export Reproducible: Always User Profile Reset: No Additional Info: bmp "works" cause it uses a different export mode where its slightly scaled down to fit the right/bottom border into the canvas User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Created attachment 131203 [details] demo
I have a workaround, if its a good idea or not I'm not 100% sure though https://gerrit.libreoffice.org/#/c/34243/
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=512afb41899a78f1e19ba79f237608aec15cc8bc Resolves: tdf#105998 distort hairline borders to fall inside the canvas It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 82636 has been marked as a duplicate of this bug. ***
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=15cdcd0346b7aa98d4697edec8aeea9c810efa62 Related: tdf#105998 except cut and paste as bitmap instead of export It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
@Caolan: This is one of the problems with Hairlines, see PolygonHairlinePrimitive2D::getB2DRange. Basic prob is that hairlines are view-dependent in their size - dependent of ViewTransformation. Thus they always have to be handled dependent on ViewTransformation aka MapMode in OutDev. HTH!
Unfortunately is in the way now. Checked, can be better fixed in GetBitmapFromMetaFile. The problem is specific to Metafile data having Hairlines on their right/bottom. The non-bTransparent path is already using GDIMetaFile::GetBoundRect that differentiates between Rectanges for content and hairline - already fixing this path in that case. This is the right place to do - it's a GDIMetaFile-specific error. Doing it in the VclPixelProcessor2D is not good in the long run. Anyways - basegfx::utils::distort does work, but is intended to deform geometry interactively in Draw...
Suggestion is at https://gerrit.libreoffice.org/#/c/59220/
Armin Le Grand committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=046df0a876b3d948bb1e14443c00c180bc8cccaa tdf#105998: Enhanced fix for MetafileToBitmap at better place It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Updated, checked, fixed.
Created attachment 144909 [details] everything ok; this is generated file I attached a generated .png, everything is as aspected. tested on Version: 6.2.0.0.alpha0+ Build ID: e005ab5d40d358adb75a64e140d46f4bf605647d CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-09-15_02:08:38 Locale: ro-RO (ro_RO.UTF-8); Calc: threaded
I still see a form of this bug in LibreOffice 5.4.4 and 6.0.6 when exporting a selection. How to reproduce: - Open https://github.com/TurboVNC/turbovnc/raw/master/doc/x11transport.odg - Ctrl-A/Command-A to select all - File --> Export - File type: PNG - Check "Selection" - Click "Save" - Enter "630" for width If "Save transparency" is checked, then the right-hand border of the dashed rectangles is not present in the exported image. If "Save transparency" is unchecked, then the exported image is correct.
Still occurring in 6.3.2 Draw...
Created attachment 176751 [details] Sample ODG file This bug is still present in LO 7.3 beta 1. Other users have reported PNG export problems where the bottom and left borders are missing some pixels when exporting the "selection" (bug 132590). I attached a very simple ODG file with a rectangle and a thick border. If you select and export this rectangle, you'll notice that the bottom and left borders will be missing a few pixels. In my experience, this PNG export bug has always existed. Should we set this bug report to REOPENED ?
Created attachment 176752 [details] Resulting PNG file This is the resulting PNG file. Note that the bottom and left borders are missing some pixels. All tests were done with LO 7.3 beta 1. Version: 7.3.0.0.beta1 / LibreOffice Community Build ID: 436f14c25ec1847646b953cf13d0db4f7ca3be57 CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: threaded
never reopen multi-year old closed bugs, file a new one and reference the old one.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5d05abcc7cb53fd7f7d7ed700e3c65e9da3e5dea tdf#105998: sd_png_export_tests: Add unittest It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.