Image bug?

I am working on some higher-res frame animation using spritesheets, and I tried to use a spritesheet image as a mesh texture that has a width greater than 2048. Applying that image as a texture crashes codea. Also, if you try to just use sprite(bigimage) it will crash. Here is test code:

function setup()
    img = image(2049,100) 
    saveImage("Documents:testcr",img)
end

function draw()
    sprite("Documents:testcr")
end

For now, a workaround is to use readImage to get the image, then you can use that image with no problems. This isn’t a major issue but I thought you might like to know.

Interesting that readImage works. The iPad does not support textures greater than 2048x2048 pixels - so I wouldn’t recommend exceeding that amount in any dimension.

Okay, thanks @Simeon, I didn’t know of that limitation of the iPad. I will use smaller sprite sheets and no issue. Sorry to bother with a “bug” that isn’t really a bug.

It’s a bug that it crashes — we should not allow image sizes to get that large. Thanks for finding it.