Bug 164063 - Rotating a raster image 90 degree left/right with right click context menu doesn't instantly paint on screen
Summary: Rotating a raster image 90 degree left/right with right click context menu do...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Images Object-Rotation
  Show dependency treegraph
 
Reported: 2024-11-27 04:12 UTC by Telesto
Modified: 2024-11-28 19:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (58.20 KB, application/vnd.oasis.opendocument.text)
2024-11-27 04:12 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2024-11-27 04:12:01 UTC
Description:
Rotating a raster image 90 degree left/right with right click context menu doesn't instantly paint on screen

Steps to Reproduce:
1. Open the attached file
2. Right click the top left image
3. Select Rotate or flip -> Rotate 90 degrees -> nothing appears to happen
4. Defocus the LibreOffice window or double click the an image -> screen gets updated

Actual Results:
Nothing appears to happen, using Skia/Raster or Skia/Metal.
Possibly Mac specific, didn't test Windows

Expected Results:
Instant refresh


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5e0c670e6534fee529ea46d520c6b442bea93aac
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2024-11-27 04:12:20 UTC
Created attachment 197815 [details]
Example file
Comment 2 mkt 2024-11-27 05:47:04 UTC
Hi Telesto,

I could reproduce and also noticed another behavior in both version 24.8.2.1 and 25.2.0.0.

1. Open the attached file
2. Right click the top left image
3. Select Rotate or flip -> Rotate 90 degrees -> nothing appears to happen
4. Right click the top right image
5. Select Rotate of flip -> Rotate 90 degrees
6. Both images rotate right at the same time

I have updated the status to NEW.

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ce4ae4f082d8fe80da242836c57d55a456eac5e0
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 Telesto 2024-11-27 07:16:05 UTC
@Regina
I have no idea what's going on here. The images in the example file have a delayed execution or painting on screen when rotating. Apparently a thing for years (at least also in 7.0.0.3) 

However there are cases where it simply works, like attachment 184430 [details]
Comment 4 Regina Henschel 2024-11-27 16:00:28 UTC
I see the problem still in Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 7c7e7da1538c1ed0c65821e18233ec9dcdc6cd2b
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

(In reply to Telesto from comment #3)
> @Regina
> I have no idea what's going on here. The images in the example file have a
> delayed execution or painting on screen when rotating. Apparently a thing
> for years (at least also in 7.0.0.3) 
> 
> However there are cases where it simply works, like attachment 184430 [details]
> [details]

The difference between the two images in the test file is their color distribution. The right image has less colors and these colors are small peaks in the color histogram. The left image has about 1.5 times colors and wider peaks in the color histogram. When you reduce the colors of the left image to 16 colors (still with 24bit color depth), then the rotation is as immediate as with the right image.

The conclusion for me is, to not burden images transformations to LibreOffice, but transform images in a dedicated image editing application and use the final result in LibreOffice.
Comment 5 Telesto 2024-11-28 19:24:06 UTC
(In reply to Regina Henschel from comment #4)
> The conclusion for me is, to not burden images transformations to
> LibreOffice, but transform images in a dedicated image editing application
> and use the final result in LibreOffice.

Seems quite a burden. I simply copy/pasted a couple image from the web. Wanted to rotate one of them for comparison, and encountered the quirky behaviour...