{"action":"created","issue":{"url":"https://api.github.com/repos/openseadragon/openseadragon/issues/381","repository_url":"https://api.github.com/repos/openseadragon/openseadragon","labels_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/381/comments","events_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/381/events","html_url":"https://github.com/openseadragon/openseadragon/issues/381","id":31646530,"number":381,"title":"Safari iOS, images don't display if over the resource limit (and useCanvas =  true)","user":{"login":"monospaced","id":98794,"avatar_url":"https://avatars.githubusercontent.com/u/98794?v=3","gravatar_id":"","url":"https://api.github.com/users/monospaced","html_url":"https://github.com/monospaced","followers_url":"https://api.github.com/users/monospaced/followers","following_url":"https://api.github.com/users/monospaced/following{/other_user}","gists_url":"https://api.github.com/users/monospaced/gists{/gist_id}","starred_url":"https://api.github.com/users/monospaced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monospaced/subscriptions","organizations_url":"https://api.github.com/users/monospaced/orgs","repos_url":"https://api.github.com/users/monospaced/repos","events_url":"https://api.github.com/users/monospaced/events{/privacy}","received_events_url":"https://api.github.com/users/monospaced/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openseadragon/openseadragon/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2014-04-16T14:32:17Z","updated_at":"2016-07-07T01:35:44Z","closed_at":null,"body":"Preamble:\r\n\r\nImages in Safari iOS are subject to [resources limits](https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html#//apple_ref/doc/uid/TP40006482-SW15)\r\n\r\nIn essence, newer iOS devices have an image area limit of 5,242,880 (5 * 1024 * 1024)\r\n\r\nStep to recreate issue:\r\n\r\n• Make an image (PNG, JPG, etc) that is over the iOS resource limit, e.g. 2984px x 1757px = 5,242,888px\r\n\r\n•  open this image in OpenSeadragon via a Legacy Image Pyramid - the image will not load:\r\n\r\n```json\r\n{\r\n  \"tileSources\": {\r\n    \"type\": \"legacy-image-pyramid\",\r\n    \"levels\": [{\r\n      \"url\": \"images/5242888.jpg\",\r\n      \"width\":  2984,\r\n      \"height\": 1757\r\n    }]\r\n  }\r\n}\r\n````\r\n• change `useCanvas` to false - the image will now load.\r\n\r\n-----\r\n\r\nI'm not sure if it's the canvas limit or the image limit that is causing this issue. But the threshold image area required for it not to display is exactly 5,242,880.\r\n\r\nIf the same over-limit image is opened directly in the browser, it will be displayed, because the browser automatically reduces the size to bring it under the limit.\r\n\r\nPerhaps this is not happening in OpenSeadragon because the image is being opened programatically by JS so it can be drawn to the canvas?\r\n\r\nIt is possible to work around this issue by setting useCanvas to false, perhaps by including an additional User Agent sniff in the $.supportsCanvas function. But this is quite unsatisfactory of course.\r\n\r\nI'll continue to look into this issue, but thought I would log it here for the community also :)"},"comment":{"url":"https://api.github.com/repos/openseadragon/openseadragon/issues/comments/230955730","html_url":"https://github.com/openseadragon/openseadragon/issues/381#issuecomment-230955730","issue_url":"https://api.github.com/repos/openseadragon/openseadragon/issues/381","id":230955730,"user":{"login":"terenceingram","id":191325,"avatar_url":"https://avatars.githubusercontent.com/u/191325?v=3","gravatar_id":"","url":"https://api.github.com/users/terenceingram","html_url":"https://github.com/terenceingram","followers_url":"https://api.github.com/users/terenceingram/followers","following_url":"https://api.github.com/users/terenceingram/following{/other_user}","gists_url":"https://api.github.com/users/terenceingram/gists{/gist_id}","starred_url":"https://api.github.com/users/terenceingram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terenceingram/subscriptions","organizations_url":"https://api.github.com/users/terenceingram/orgs","repos_url":"https://api.github.com/users/terenceingram/repos","events_url":"https://api.github.com/users/terenceingram/events{/privacy}","received_events_url":"https://api.github.com/users/terenceingram/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T01:35:43Z","updated_at":"2016-07-07T01:35:43Z","body":"@nmacd85 we are very happy using DZI. It's worked a treat on a our historic pictures, digitised books, manuscripts and map collections. I originally was using the legacy image pyramid but once I hooked up DZI we were floored at the result. Here's an example of a panorama: http://nla.gov.au/nla.obj-151651939 and map: http://nla.gov.au/nla.obj-148371790. The bigger images are around 1 GB TiFF files. So for many images we have lots of detail. And some are huge, like a a panorama that is usualy a few metres wide. Using OSD together with IIP has been a massive win for us. We serve up over 1.3 million images using IIP (it's growing each week). Of those we use OSD to serve up around 280 000 images. The rest are served up using IIP into the internet archive's book reader as they are digitised books or ephemera that have been OCR'ed.\r\n\r\nHowever the DZI technology has absolutely wowed our public users and stakeholders. We used the same digitised images - just converted into JPG2000, we digitised some of them 15 years ago, but the detail we can now show online is amazing. \r\n\r\nPost up a URL to your application once it's complete so we can see what you have developed :)\r\n\r\n@iangilman "}}
{"actor":{"display_login":"terenceingram"}}