Bug 145819 - at insert a rotated image, yes and no are reversed
Summary: at insert a rotated image, yes and no are reversed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Gabor Kelemen (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords: implementationError
: 145818 (view as bug list)
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2021-11-21 21:00 UTC by esw
Modified: 2021-12-06 13:30 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example image with rotation, saved by Shotwell (23.45 KB, image/jpeg)
2021-11-29 13:25 UTC, Gabor Kelemen (allotropia)
Details
Screencast (w fix) (367.23 KB, video/mp4)
2021-12-01 14:40 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esw 2021-11-21 21:00:56 UTC
Description:
I use LibreOffice in German. I have a rotated image and I drag it into LibreOffice Writer. Writer opens a dialog with the text: "This image is rotated. Would you like to rotate it into standard orientation?" ("Dieses Bild ist gedreht. Möchten Sie es zurücksetzen?"). You can choose between "yes" ("Ja") or "no" ("Nein"). I want to have the image in this rotation, because of this, I choose "no". The image, I get in LibreOffice, was in standard orientation. This is not, what I expect. I want to have the image in the rotation, I have on the PC and the image was not in the standard orientation.
I check it on the other way. When I choose "yes" in the dialog, the image was rotated as I want to have.

Steps to Reproduce:
1. Rotate an image on your PC (I did it without LibreOffice).
2. Drag the picture in LibreOffice.
3. A dialog was open "This image is rotated. Would you like to rotate it into standard orientation?".
4. Choose "no".

Actual Results:
The image was put into the document in standard orientation (not rotated).

Expected Results:
The image is in the document in the rotated version.

I think the functions on the yes and no buttons in the dialog must be flipped.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 1 esw 2021-11-21 21:08:41 UTC
*** Bug 145818 has been marked as a duplicate of this bug. ***
Comment 2 Gabor Kelemen (allotropia) 2021-11-29 13:25:11 UTC
Created attachment 176569 [details]
Example image with rotation, saved by Shotwell

Confirming in version:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 9f94ea12c7d919441ccbb8ebc99adff11a2e6fd1
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: hu-HU
Calc: threaded

Happens all the way back to 4.1.0, when this was dialog first introduced, so implementationError.
Comment 3 Gabor Kelemen (allotropia) 2021-11-29 22:13:11 UTC
Proposed patch: https://gerrit.libreoffice.org/c/core/+/126070
Comment 4 Commit Notification 2021-11-30 08:51:45 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cda9a5af36977420bae34737cd7b52cddb3226ef

tdf#145819 Revert logic of the image-with-rotation dialog

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2021-11-30 11:30:29 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/8185375a269b53bc1968f04223a0c290d30ef166

tdf#145819 Revert logic of the image-with-rotation dialog

It will be available in 7.3.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-11-30 11:30:43 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/6417d9a3b79346da4e1d08994436a0a17849cd8a

tdf#145819 Revert logic of the image-with-rotation dialog

It will be available in 7.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Aron Budea 2021-12-01 02:43:20 UTC
Gabor, I'm afraid there's a problem with the patch. This used to work fine in Linux, and now it doesn't.
Comment 8 Gabor Kelemen (allotropia) 2021-12-01 07:52:18 UTC
(In reply to Aron Budea from comment #7)
> Gabor, I'm afraid there's a problem with the patch. This used to work fine
> in Linux, and now it doesn't.

Could you elaborate please? I tested it on Linux as well and seems to work for me.
Comment 9 Aron Budea 2021-12-01 14:40:45 UTC
Created attachment 176631 [details]
Screencast (w fix)

Here's a screencast taken with a fresh Linux build.
When I open the image with GIMP, the "original" is when the house is upright, and the rotated is when it's rotated 90 degrees clockwise.
In LO, when I choose No, I get the 90-degree rotated house, and when I choose yes, I get the upright house.
Comment 10 Gabor Kelemen (allotropia) 2021-12-01 15:13:51 UTC
(In reply to Aron Budea from comment #9)
> Created attachment 176631 [details]
> Screencast (w fix)
> 
> Here's a screencast taken with a fresh Linux build.
> When I open the image with GIMP, the "original" is when the house is
> upright, and the rotated is when it's rotated 90 degrees clockwise.
> In LO, when I choose No, I get the 90-degree rotated house, and when I
> choose yes, I get the upright house.

That's the expected way. The dialog asks "Would you like to rotate it into standard orientation?".
Saying No to this means apply the (90 degrees) rotation, Yes means do not apply the rotation (set it back to upright).
Comment 11 Aron Budea 2021-12-01 16:26:31 UTC
(In reply to Gabor Kelemen (allotropia) from comment #10)
> That's the expected way. The dialog asks "Would you like to rotate it into
> standard orientation?".
> Saying No to this means apply the (90 degrees) rotation, Yes means do not
> apply the rotation (set it back to upright).

Hm, that's not how I'd interpret the dialog, however I find using "rotation" twice in the dialog confusing. The image is stored in a non-rotated state, and rotation is set via EXIF data. Asking the user whether they want to rotate the image, in my interpretation means if they want to apply the rotation that is set separately, and now have an image that does not have separate rotation information. 

However, now the question is interpreted in a way whether the user wants to un-rotate the image, and applying the rotation is the default. But the un-rotated image isn't something I'd call "standard orientation". It's the static view from the camera, as shown in the first image at [1].

UX team, could we consider a different wording of the question where the user is unambiguously asked whether they want to apply the EXIF rotation to the inserted image or not?

[1] https://jdhao.github.io/2019/07/31/image_rotation_exif_info/
Comment 12 Commit Notification 2021-12-01 17:13:19 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/970cbb120a62e952e80348b8e94478600241273a

tdf#145819 Revert logic of the image-with-rotation dialog: sc & sd

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Aron Budea 2021-12-01 19:39:38 UTC
For the record this dialog was removed when inserting images in Writer, with the following commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=baadefe9cb8e6745493b0c383e1d66ff3905d153
author		Marco Cecchetti <marco.cecchetti@collabora.com>	2019-10-20 18:28:07 +0200
committer	Marco Cecchetti <marco.cecchetti@collabora.com>	2020-03-06 10:39:26 +0100

"On insert image rotate automatically based on EXIF orientation tag"

So, perhaps kill it in case of the other apps, and drag&drop as well, and apply EXIF rotation automatically?
Comment 14 Heiko Tietze 2021-12-02 08:25:58 UTC
Good point. 

The label "This image is rotated. Would you like to rotate it into standard orientation?" is indeed not perfectly clear. "Yes" was "This image is rotated. Would you like to keep this rotation?" and is now "This image is rotated. Would you like to insert the image with the original orientation?" (which is not better).

On https://gerrit.libreoffice.org/c/core/+/82085/1 the decision was made to unconditionally insert the rotated image. Don't see a reason why Impress should behave differently. Sorry Gavor for not checking more closely.
Comment 15 Commit Notification 2021-12-02 09:07:23 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/1e1b1d63028fd1328ed8cd72b5e2d6721bf08a73

tdf#145819 Revert logic of the image-with-rotation dialog: sc & sd

It will be available in 7.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2021-12-02 09:08:37 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/f62558cb9f03b74fa2d97a01a149e7572a6084dc

tdf#145819 Revert logic of the image-with-rotation dialog: sc & sd

It will be available in 7.3.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Gabor Kelemen (allotropia) 2021-12-02 10:17:21 UTC
(In reply to Aron Budea from comment #13)
> For the record this dialog was removed when inserting images in Writer, with
> the following commit:
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=baadefe9cb8e6745493b0c383e1d66ff3905d153
> author		Marco Cecchetti <marco.cecchetti@collabora.com>	2019-10-20 18:28:07
> +0200
> committer	Marco Cecchetti <marco.cecchetti@collabora.com>	2020-03-06
> 10:39:26 +0100
> 
> "On insert image rotate automatically based on EXIF orientation tag"
> 

I wonder why, and why only in that situation?

> So, perhaps kill it in case of the other apps, and drag&drop as well, and
> apply EXIF rotation automatically?

That can work as well, please file a new report.

For reference, MSO 2013 does this:
Word: Insert->Pictures = Rotated, DnD = Not rotated
PP: Insert->Pictures = Rotated, DnD = Rotated
Excel: Insert->Pictures = Rotated, DnD does not work.

and there is no similar confirmation dialog. We could do this more consistently :).
Comment 18 Christian Lohmaier 2021-12-06 13:30:12 UTC
7.2.4 was a hotfix release, updating target in status-whiteboard