Bug 107984 - Missing pixels on right and bottom when export/copy drawing
Summary: Missing pixels on right and bottom when export/copy drawing
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2017-05-21 04:26 UTC by Brendan Simon
Modified: 2018-01-03 08:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Draw file with drawing to copy/import into Writer (8.08 KB, application/vnd.oasis.opendocument.graphics)
2018-01-03 05:23 UTC, Brendan Simon
Details
Exported drawing selection to PNG file (4.08 KB, image/png)
2018-01-03 05:24 UTC, Brendan Simon
Details
Exported drawing selection to SVG file (8.58 KB, image/svg+xml)
2018-01-03 05:24 UTC, Brendan Simon
Details
Writer file with drawing copy/pasted, and PNG/SVG image imported (23.23 KB, application/vnd.oasis.opendocument.text)
2018-01-03 05:25 UTC, Brendan Simon
Details
Screen shot of Writer doc with copied/imported images. (1.36 MB, image/png)
2018-01-03 05:27 UTC, Brendan Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Simon 2017-05-21 04:26:29 UTC
Description:
Export (or copy) drawing or selection and insert (or paste) results in an image that has missing pixels on the right and bottom.  It looks like it is missing just one pixel.  Smells of an out by one error somewhere.

Steps to Reproduce:
1. Create a drawing with a single box, with a fill colour and black outline.
2. Select All.
3. Copy to clipboard.
4. Paste in Writer document (also MS Word document, or email, etc).
5. Try with the box outline width being 1 and 2 pixels.

Actual Results:  
Image is inserted/pasted with missing pixels on right and bottom.

Expected Results:
Expect to have an image with a box with all pixels.  i.e. the box outline is visible and has the correct pixel width.


Reproducible: Always

User Profile Reset: No

Additional Info:
I've encountered this issue over quite a number of versions of LibreOffice, both exporting the image to various formats (PNG, BMP, etc) and importing into various applications (e.g MS Word, LO Writer), using a mix of operating systems (e.g. Draw on OS X, inserting into MS Word on MS Win7).


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Buovjaga 2017-05-27 17:47:26 UTC
Please attach a PNG screenshot of the Writer document, so we can measure the pixels.

I did it for a box with borders 2,3 pt wide and in GIMP I could verify the width was correct (by moving around a selection).
Comment 2 QA Administrators 2018-01-02 10:15:29 UTC Comment hidden (obsolete)
Comment 3 Brendan Simon 2018-01-03 04:48:31 UTC
I can no longer replicate this using LO v5.4.3 (on Mac OS X).

I can successfully copy and paste diagrams from Draw to Writer and all pixels are viewable.

I can export the diagram from Draw (using PNG and selection box ticked) and then drag the file to a Writer document, where it is inserted and all pixels are viewable.

I also tried SVG, and it does seem to render with some artifacts (some lines look thinner and/or missing).

If I scale the PNG image (using shift and drag a corner handle), then some lines look thicker than others.

This may be a scaling issue, which may or may not be easily "fixed".  Still insertion of some image types don't look very nice (e.g. SVG).

I will upload some images to demonstrate.
Comment 4 Brendan Simon 2018-01-03 05:23:01 UTC
Created attachment 138833 [details]
Draw file with drawing to copy/import into Writer
Comment 5 Brendan Simon 2018-01-03 05:24:06 UTC
Created attachment 138834 [details]
Exported drawing selection to PNG file
Comment 6 Brendan Simon 2018-01-03 05:24:38 UTC
Created attachment 138835 [details]
Exported drawing selection to SVG file
Comment 7 Brendan Simon 2018-01-03 05:25:57 UTC
Created attachment 138836 [details]
Writer file with drawing copy/pasted, and PNG/SVG image imported
Comment 8 Brendan Simon 2018-01-03 05:27:22 UTC
Created attachment 138837 [details]
Screen shot of Writer doc with copied/imported images.
Comment 9 Brendan Simon 2018-01-03 05:29:58 UTC
Uploaded files.

The ODG has the original drawing (box with colours and label).

The drawing was selected and copy-n-pasted into the Writer doc (ODT).

The drawing was selected and exported as PNG and SVG files, then drag-n-dropped into the Writer doc (ODT).

A screenshot of the writer document was taken to see the results, without having to load up the Writer doc.
Comment 10 Buovjaga 2018-01-03 08:23:38 UTC
(In reply to Brendan Simon from comment #3)
> I can no longer replicate this using LO v5.4.3 (on Mac OS X).

Ok, let's close.