4

I want to load an image of dimensions larger than 2000x2000 pixels on the iPad to show in canvas on a webapp - e.g. 4000x4000 pixels. Due to memory limit, this doesn't work. Could it be possible to load the image into htmlstorage, tile it there, and then show only tiles in the canvas? Or is the limit of around 2000x2000 pixels absolute? I could tile on server, but it is not too easy to do for the current application.

There are some discussion about loading several images which are more than 6 MB in total (e.g. iPad/iPhone browser crashing when loading images in Javascript ), but this does not apply to my case as I have one image which itself is over the memory limit.

Community
  • 1
  • 1
jankoc
  • 118
  • 1
  • 7
  • I would say, try it out. My guess would be that you can't load a image that big using the JS image object, so you can't create tiles from it> But I'm might be wrong, as I read that the iOS has a texture size limited of 2044×2044, so as long as it is just loaded into memory, without using a texture you could be good. – Gerben Oct 31 '11 at 13:00
  • Try it out, but you will probably fail. Loading ~2MB image from localStorage was **consistently** (each and every time) crashing desktop Chrome 13 for me. Maybe you will have better luck with Safari iOS, and while i doubt it - you should just try. – c69 Oct 31 '11 at 19:46

1 Answers1

1

I'd try splitting the image as you suggest and see if some of it can be saved to sessionStorage/localStorage. However don't forget there appears to be a 5MB limit for localStorage (Limit of localstorage on iPhone?) on iOS.

Community
  • 1
  • 1
Jacob
  • 1,056
  • 1
  • 12
  • 18