https://bugs.documentfoundation.org/show_bug.cgi?id=156509

Buovjaga <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #23 from Buovjaga <[email protected]> ---
(In reply to Olivier from comment #22)
> Created attachment 198769 [details]
> Copy-paste in LO 24.8 / Problem of image ratio
> 
> Image ratio is not right after pasting the content in the document. 
> It can be manually corrected with "RMB > Properties > Original Size" for
> example, but I believe the right image ratio should come out-of-the-box.

This is because the web page itself makes this unfairly difficult for
LibreOffice. If you inspect the images on the web page, you will notice the
width is defined as *percentages* in the "width" attribute of the element:

<img
src="/sites/default/files/inline-images/Proc%C3%A9d%C3%A9sdefabrication_Cousu_mocassin_CTC.jpg"
data-entity-uuid="208f283a-6317-49d9-9d6d-c4b60609f9dc" data-entity-type="file"
alt="cousu mocassin" width="24.97%" height="651" loading="lazy">

LibreOffice then retains this percentage value for the width of the image, but
this will lead to a bad result considering your expectations because the image
does not live in the same space as before. To be honest, I don't understand why
the creators of the website defined the width like that and height is defined
in pixels. img elements also have these rules on the page:

max-width: 100%;
height: auto;

In your browser's dev tools, you can uncheck that height rule and see how fun
the images look...

In summary, the web page is built in a strange way and LibreOffice does not
have godlike powers to determine how the images used to look in a completely
different environment. We can't just discard the percentage value from the
clipboard content as that would break the workflow of some other group of
users.

Unfortunately, Writer lacks a powerful workflow to correct documents with this
issue. From what I see, both of these should be implemented to quickly apply
original size to multiple images:

Bug 107275 - Make .uno:OriginalSize work in Writer
Bug 34438 - Group selection does not work with raster images in Writer (Shift +
Click nor rectangle selection)

I imagine that after those would be done, we could select multiple images via
the Navigator and then apply original size to all of them. That would be a
super quick way.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to