Bug 203482 - Orientation/rotation/EXIF is not preserved after image resizing (native-media-resizing)
Summary: Orientation/rotation/EXIF is not preserved after image resizing (native-media...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-28 01:51 PDT by MooYeol Prescott Lee
Modified: 2021-06-12 02:33 PDT (History)
8 users (show)

See Also:


Attachments
Reproducible Image Input (1.14 MB, image/heic)
2019-10-28 01:51 PDT, MooYeol Prescott Lee
no flags Details
System UI Prompt 1 (1.17 MB, image/png)
2019-10-29 14:17 PDT, MooYeol Prescott Lee
no flags Details
System UI Prompt 2 (2.17 MB, image/png)
2019-10-29 14:17 PDT, MooYeol Prescott Lee
no flags Details
System UI Prompt 3 (280.95 KB, image/png)
2019-10-29 14:18 PDT, MooYeol Prescott Lee
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description MooYeol Prescott Lee 2019-10-28 01:51:27 PDT
Created attachment 382050 [details]
Reproducible Image Input

Currently, Native media resizing feature drops orientation exif value, nor rotate image as per its orientation value. 

If input image has non-portrait orientation exif value, resize output image will be shown as invalid orientation.

Please refer to Github Issue of native-media-resizing repository for details:
https://github.com/addyosmani/native-media-resizing/issues/1#issuecomment-545980413

Tested in iPhone X, iOS 13.1.3 Safari, and attached reproducible input image.
Comment 1 Radar WebKit Bug Importer 2019-10-28 16:34:10 PDT
<rdar://problem/56689947>
Comment 2 Simon Fraser (smfr) 2019-10-29 14:09:01 PDT
What do you mean by "native media resizing"? Is this a JS library that does image resizing?
Comment 3 MooYeol Prescott Lee 2019-10-29 14:17:32 PDT
Created attachment 382224 [details]
System UI Prompt 1
Comment 4 MooYeol Prescott Lee 2019-10-29 14:17:58 PDT
Created attachment 382225 [details]
System UI Prompt 2
Comment 5 MooYeol Prescott Lee 2019-10-29 14:18:15 PDT
Created attachment 382226 [details]
System UI Prompt 3
Comment 6 MooYeol Prescott Lee 2019-10-29 14:23:42 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> What do you mean by "native media resizing"? Is this a JS library that does
> image resizing?

No, It's a system feature. I mean, Starting from iOS 13, User can change quality of selected image before file uploading.

For example, When HTML page has <input type="file"> element and when user clicks it. A system prompt (https://bugs.webkit.org/attachment.cgi?id=382224) will be shown.
and Photo Library will be opened when user clicks "Photo Library" item.
In Photo Library, User can select any images in Photo Album, and when user selects any image, Quality control will be shown (https://bugs.webkit.org/attachment.cgi?id=382225) and user can change target image quality (https://bugs.webkit.org/attachment.cgi?id=382226)
Comment 7 Simon Fraser (smfr) 2019-10-29 14:45:45 PDT
Got it, thanks.
Comment 8 Zach 2020-03-04 13:38:00 PST
Just curious if this is something that might be resolved soon?
Comment 9 Henry 2020-07-18 22:49:48 PDT
I just tested again on iOS 13.5.1

If you select the 'Actual Size' option, it appears that the orientation information is correctly retained. But if you select any other option (Large, Medium or Small) the image has an incorrect orientation. This issue, combined with this one https://bugs.webkit.org/show_bug.cgi?id=207088, make photo uploads from iOS practically useless.

Is this a Safari problem or a Webkit problem?
Comment 10 Simon Fraser (smfr) 2020-07-20 09:41:58 PDT
Neither; this problem exists in another system framework.