Description: Insert a picture in Writer, it will have an initial import size (which is not the original size of the picture but the width-height portion is correct.) Right-click on the picture, select Properties-Position and Size. Lock the width-height portion to keep the correct portion. Adjust width or height to, for example, half of the imported size, and select OK. Then right-click on the picture to go to the Properties-Position and Size again. Select Original size. This time the size is wrong. Possible related bugs: tdf#52598, tdf#96178, but not sure if they are actually related Steps to Reproduce: 1. Open a new file and insert a picture. (Tested with a jpg file which will be attached later) 2. Right-click on the picture, select Properties-Position and Size. Lock the width-height portion to keep the correct portion. 3. Adjust width or height to, for example, half of the imported size, and select OK. The picture is scaled correctly. 4. Right-click on the picture to go to the Properties-Position and Size again. Select Original size. This time the size is wrong. Actual Results: The aspect ratio of the image is distorted. Expected Results: It should reset to the original size. Reproducible: Always User Profile Reset: No Additional Info: Earliest version tested is 6.4.4 版本:6.4.4.2 組建 ID:3d775be2011f3886db32dfd395a6a6d1ca2630ff CPU 執行緒:4; OS:Linux 6.8; UI 算繪:預設; VCL: kf5; 語言地區:zh-TW (zh_TW.UTF-8); 介面語言:zh-TW Calc: threaded But it should happen in earlier version as well. In 25.2 dev it is not fixed yet. Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 9e3803ae438ddcf91ec0e15431be379561d28ba6 CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb) Locale: zh-TW (zh_TW.UTF-8); UI: en-US Calc: threaded
Created attachment 199451 [details] JPG file used to test The original size is 664x856. When inserting into Writer (tested with 25.2.0.0 alpha1) the picture size is set to 481.9 x 621.2. (pt) Set the height to 300 pt, the width is automatically set to 232.7. The portion is still correct. Select Original Size in Properties - Position and Size, it is set to 414x642, which is distorted.
If I clicked "Original Size" right after inserting the picture, it would be set to 498x642, which was NOT actually original size, but the portion was still correct. This problem happened only after making any adjusting to the height or width (with keeping the portion all the way)
Hello [user's name], I can't confirm that the bug is present in master. Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: a8ec21adf255b70bb6eeb0a1717190df303d8b26 CPU threads: 12; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_FI); UI: en-US Calc: threaded
Hi Franklin, I also can't reproduce the bug in Version: 25.2.0.3 (X86_64) / LibreOffice Community Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: threaded
OK, I just tried, and found that it would need an additional step to reproduce. Steps to Reproduce: 1. Open a new file and insert a picture. (Tested with a jpg file which will be attached later) 2. Right-click on the picture, select Properties-Position and Size. Lock the width-height portion to keep the correct portion. 3. Adjust width or height to, for example, half of the imported size, and select OK. The picture is scaled correctly. ----> Here: 4. Move the picture a bit without changing its size. Use left-button to drag the image somewhere, no need too far. Just move a bit would be sufficient. ----> Then 5. Right-click on the picture to go to the Properties-Position and Size again. Select Original size. This time the size is wrong. I would always drag the picture to the center for easier testing.
Hi Franklin, now I can confirm that the bug is present in Version: 25.2.1.2 (X86_64) / LibreOffice Community Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: threaded also in Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e79e12484f5a7ec20e48233a2b5b60d7bd8b54ab CPU threads: 16; OS: Windows 11 X86_64 (build 22631); UI render: Skia/Vulkan; VCL: win Locale: de-DE (de_DE); UI: de-DE Calc: threaded But it only happens when the image is move near by the edges. If I move the picture to the middle of the page, the original size is correct.
This problem look like to have to do with pictures nearing or stretching the page boundaries. Size of the picture seems to be calculated from the boundary too, not from the current or original size (tough that would make sense to keep the ratio correct, if selected). I ran into an example which I think matches descripbed issue, at least this is the closest bug report I could find. My example is that I export documention pages from my XWiki system to ODF document format. After opening the exported file the pictures in the document stretch over the page boundary. To get the pictures right, I have to resize them. Observations are: * Original picture properties: 1207x525 pixels (~2,3:1) * Open exported odt file in LO, select picture properties. This shows the size as 18,59 cm x 13,45 cm (~1,4:1) which reflect the 'visible area' of the picture in the document, which is not based on original picture size or ratio. As the pictures stretched the page boundary it's still there, just not visible. Attached Picture-resize-issue-01.png and example document Test+page+with+picture+export+to+odt.odt * Select 'Original Size' button, this will show 18,59 cm x 11,11 cm (~1,6:1). The Height is correct here but the Width of the picture seems repored wrong. Originally the picture is larger but is cut off at the page boder (?). The page size is Letter, so Page Style shows Width 21,59. Take left margin 2 cm off minus right margin 1 cm == 18,59 cm which matches the just reported 'original' picture width. * Select 'Keep ratio' and set Width to 14 cm. Height is calculated based on the show 18,59 cm x 11,11 cm (~1,6:1) and calculates 14,00 cm x 6,09 cm (~2,3:1) so the original picture size is used here for resizing and not the reported size. * To test if reported picture size is locked to page size, set the left page margin from 2 cm to 1 cm. The picture properties now reports 19,59 cm x 11,11 cm so the concludes the reported original width is cut off at the usable area of the page. Attached screenshots Picture-resize-issue-01.png to Picture-resize-issue-08.png and example document Test+page+with+picture+export+to+odt.odt I think it's important to do resizing based on the original picture size and ration and not on the reported visible area. For example if I open this document in MS Word and resize the picture, that works fine (so uses the original size and ratio for the resize process). I would also suggest to always have the Keep Ratio checkbox be selected, I guess most cases one would just size a picture up or down, not stretch it.
Created attachment 200088 [details] Test+page+with+picture+export+to+odt
Created attachment 200089 [details] Screenshots of my findings
I added the screenshots mentioned to the attachement "Test+page+with+picture+export+to+odt-SCREENSHOTS.odt". Modified orginal document with pasted version of the picture is "Test+page+with+picture+export+to+odt-MODIFIED-EXAMPLE.odt" Tested LO versions: Version: 25.2.2.2 (X86_64) / LibreOffice Community Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win Locale: nl-NL (nl_NL); UI: nl-NL Calc: CL threaded Recent DEV verion (About shows a white screen) but is 25.8.0.0.alpha0 with above system specs.
Created attachment 200090 [details] Modified example document containing original and pasted picture too
This is appears to be a duplicate of bug 158545, I think