Bug 167856 - Screenshot pasted in Writer, previously cropped in Draw, shows incorrect cropping
Summary: Screenshot pasted in Writer, previously cropped in Draw, shows incorrect crop...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Graphics-Export
  Show dependency treegraph
 
Reported: 2025-08-07 22:08 UTC by LeroyG
Modified: 2025-08-12 18:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LeroyG 2025-08-07 22:08:10 UTC
Description:
A screenshot cropped in Draw, when pasted in Writer shows cropped margins.
Related question in the ask site:
https://ask.libreoffice.org/t/libreoffice-25-2-draw-writer/125196

Steps to Reproduce:
1. Take a screenshot
2. Paste in Draw
3. Crop
4. Copy
5. Paste in Writer

Actual Results:
The pasted image shows more than the image after cropped.

Expected Results:
The pasted image shows the same image as after cropped.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.5.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 4; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: es-MX (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 LeroyG 2025-08-08 12:41:19 UTC
Reproducible with:

Version: 24.8.7.2 (X86_64) / LibreOffice Community
Build ID: e07d0a63a46349d29051da79b1fde8160bab2a89
CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 17763); UI render: Skia/Vulkan; VCL: win
Locale: es-MX (es_AR); UI: en-US
Calc: threaded

Version: 25.2.5.1 (X86_64) / LibreOffice Community
Build ID: 484541f705153d4ff78284873b0153c3e5a280db
CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 17763); UI render: Skia/Vulkan; VCL: win
Locale: es-MX (es_AR); UI: en-US
Calc: CL threaded<br/>
Comment 2 LeroyG 2025-08-08 12:43:13 UTC
Not reproducible with:

Versión: 6.4.7.2 (x64)
Id. de compilación: 639b8ac485750d5696d7590a72ef1b496725cfb5
Subprocs. CPU: 12; SO: Windows 10.0 Build 17763; Repres. IU: GL; VCL: win; 
Configuración regional: es-AR (es_AR); Idioma de IU: es-ES
Calc: threaded
Comment 3 Saburo 2025-08-08 15:22:53 UTC
reproduce
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 76f3531532b7618d43e4f783748e30689f58900a
CPU threads: 4; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded

bibisected with linux-64-25.2
commit 32ab4b4b6364652294891f66a86f153b65abfbbe
author	Noel Grandin <noel.grandin@collabora.co.uk>	Fri Oct 25 12:12:59 2024 +0200

tdf#139152 Exporting Image or Drawing to PNG is missing metada

implement this in a similar fashion to how export to JPEG does it. Add a
new method to calculate pixels-per-meter, because that is how PNG stores
the values internally

Change-Id: I1e4cd5a36af22e52a7c52f5b3bc2407f8523ef9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175636

***

It seems that the crop position is off because the scaling is not working properly.
Comment 4 Saburo 2025-08-08 15:49:16 UTC
not reproduce on kubuntu
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7754492f1a14806e4c1844f3ea51f545517e024b
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 5 LeroyG 2025-08-10 00:06:50 UTC
(In reply to Saburo from comment #3)
> bibisected with linux-64-25.2

Not sure what bibisect means. But if the bug is present in version 24.8... ??
Comment 6 Saburo 2025-08-10 06:06:59 UTC
(In reply to LeroyG from comment #5)
> Not sure what bibisect means. But if the bug is present in version 24.8... ??

Not reproducible for me.
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: ee3885777aa7032db5a9b65deec9457448a91162
CPU threads: 12; OS: Windows 10.0 Build 26100; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

bibisected with win64-24.8
Version: 24.8.3.0.0+ (X86_64) / LibreOffice Community
Build ID: 93f85da83c394b84d14f9d03aa2987ab5b26fca6

commit 93f85da83c394b84d14f9d03aa2987ab5b26fca6
author	Noel Grandin <noel.grandin@collabora.co.uk>	Fri Oct 25 12:12:59 2024 +0200

tdf#139152 Exporting Image or Drawing to PNG is missing metada

implement this in a similar fashion to how export to JPEG does it. Add a
new method to calculate pixels-per-meter, because that is how PNG stores
the values internally

Change-Id: I1e4cd5a36af22e52a7c52f5b3bc2407f8523ef9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175636
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 32ab4b4b6364652294891f66a86f153b65abfbbe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175611

***
Paste special
-LibreOffice drawing format --> bad
-StarView bitmap/animation(SVXB) --> good
-Graphics Device Interface metafile(GDI) --> good
-Bitmap Image(BMP) --> good