signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.62k stars 6.15k forks source link

Camera scribbles move around when rotating phone #8533

Closed subraizada3 closed 5 years ago

subraizada3 commented 5 years ago

Bug description

After taking a photo (either with the quick photo button inside the input box, or by pressing the 'add attachments' button and selecting the Camera option to use the system camera), scribbles/highlighter can be drawn onto the photo. The position of the drawn scribble (or highlight) is dependent upon the rotation of the device, and the scribble move when the device is rotated.

This is not the case with stickers/smileys or text that is placed onto the photo - those things stay when the phone is rotated.

Steps to reproduce

Actual result: The scribble moves Expected result: It should not

Screenshots

Example 1

1

Device info

Device: Galaxy S9 Android version: 8.0.0 Signal version: 4.31.7

Details:

The scribble stays in the same position in screen space. However, the photo is resized in screen space when the phone is rotated. E.g. a 1920x1440 photo could also take up that many pixels on the screen when the phone is horizontal, but when the phone is vertical the 1920x1440 photo will only take up 1440x1080 pixels on the screen. The scribble position seems to be fixed to the screen pixels, not image pixels:

5

In the above png, the image is 1920x1440. On the left side, a rectangle scribble was drawn with its top left corner at (105, 140) on the image and the screen. When rotated to vertical, the rectangle should stick to (105, 140) in the image, and be at a smaller (x, y) coordinate on the screen. But the opposite happens - the rectangle sticks to (105, 140) on the screen and ends up being at a different place in the image.

Example of the smileys and text decorations behaving correctly (they stick to the bottom left corner of the monitor in the photo): all

And finally, some more examples of the scribbles moving: 2 3 4

greyson-signal commented 5 years ago

Thank you for the detailed bug report! This was fixed in 4.32.x, which is currently in beta.