Bug 133570

Summary: Safari on iOS7.0 can't scale images with drawImage taken with it's own camera
Product: WebKit Reporter: Gregg Tavares <gman>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: dbates, dino, keving, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: iOS 7.0   
URL: http://greggman.com/downloads/examples/webkit-photo-issue/webkit-photo-issue.html
Attachments:
Description Flags
[Web Archive] greggman.com/downloads/examples/webkit-photo-issue/webkit-photo-issue.html none

Description Gregg Tavares 2014-06-06 01:34:55 PDT
An photo taken with an iPhone can not be manipulated in iOS Safari

Run the sample above, it will take a while to download the image because it's 3meg or so. The image is scaled from it's full size 3kx2k as taken directly from the iPhone, it is drawn into a 256x256 canvas using a destination scale. What it draws is incorrect.

Works on desktop Safari, Chrome and Android Chrome

I'm going to guess it's a size issue since trying smaller images works. See

http://greggman.com/downloads/examples/webkit-photo-issue/webkit-photo-issue-3.html

The problem is I'm using the <input type="file" accept="image/*"> to allow a web page to use an image the user takes or selects. The fact that I can't then actually use that image in a webpage with the canvas API seems like some limits need to be bumped up?
Comment 1 Daniel Bates 2014-06-06 12:14:07 PDT
Created attachment 232625 [details]
[Web Archive] greggman.com/downloads/examples/webkit-photo-issue/webkit-photo-issue.html

For historical preservation attached a web archive of <http://greggman.com/downloads/examples/webkit-photo-issue/webkit-photo-issue.html> as it appeared on 06/06/2014. I created the web archive using Safari Version 7.0.3 (9537.75.14).
Comment 2 Kevin Gale 2014-09-02 02:27:08 PDT
We are also seeing this problem with our HTML5 app and it is causing us lots of problem. As far as I can tell this has been a problem since iOS6.

I have also reported this in the Apple Bug Reporter - case 17917149.

We would really appreciate this being fixed.
Comment 3 Simon Fraser (smfr) 2014-09-02 10:45:57 PDT
Did you try in an iOS 8 seed?
Comment 4 Kevin Gale 2014-09-02 11:21:05 PDT
I was asked to try this in iOS8 beta 5 but my sample code would not run at all. As far as I could tell it was a problem with FileReader. I updated my original report with this information on the 12th August and also logged a new case on the 14th August relating to the new problem I found (18016794).
Comment 5 Kevin Gale 2014-09-02 11:21:45 PDT
Note: 18016794 is for Apple Bug Reporter and not WebKit.