Maximum Size for SaveImage

Hi, I have a question on saveimage. I want to be able to export a very large picture (~6000x6000 pixels). My ipad keeps crashing after I try to saveimage beyond a certain size (roughly 2500x2500). Even if I break it up into chunks of 2000x2000, and save into different files, it still crashes after a few images.

I did a test using a simple image to draw and save (eg. just a plain circles), I can get to roughly (4000x4000). I suspect this has to got to do with memory. In my prog, I pre-load many assets, so perhaps available memory is less.

Is this a current limitation of saveimage?

I thought the limit was 2048x2048

I think it goes to 4096 for retina

@zapaper If your trying to save the images during setup then it will crash if you try to do to much. I had this problem with really large pictures of numbers. I fiddled with the number of them and their size until the program didn’t crash and was at a good start up speed. If this is your problem then there’s certainly ways around it.

The maximum image size is 4096 on all iPads, but on retina screens, it doubles the size of all images to make them “retina,” so the maximum size for images on retina iPads is 2048 (even though behind the scenes it’s really 4096). Basically, 4096 / ContentScaleFactor.

However, just storing too many images in memory can also cause Codea to crash (due to lack of memory), it happens if you try and store more data than the amount of RAM in the iPad allows (I think it’s 2 GB)

Thanks for your insights. Yup. I think it’s roughly around that size. I guess I just have to stitch it separately. Don’t think memory is an issue at this point.

@SkyTheCoder AFAIA the iPad air 2 is the only iOS device with more than 1gb ram.