Creating a large scrollable image

.@frosty are you able to share just the few lines of code that allocates and renders into the image? That will help me track down what might be limiting the size.

Sure! I’ve stripped it down to the following code (tap to save the image):

EDIT: I’ve just trimmed down the code even more, so only one image is used. Still seeing the same behaviour.

--# Main


-- Use this function to perform your initial setup
function setup()
    mWIDTH = 1024
    mHEIGHT = 1024

function draw()
    if snapshot then
        capture = image(mWIDTH,mHEIGHT)
    background(255, 255, 255, 255)
    fill(255, 0, 0, 255)
    if snapshot then
        saveImage("Dropbox:1024capture", capture)
        snapshot =false

function touched(touch)
    if touch.state == ENDED then
        snapshot = true

So the image is actually 1024x1024 (that is, if you read the image back in with readImage(), the dimensions are correct?)

But the data is clipped to the screen size. I think I understand why that is happening, the default viewport command is clipping to screen space. I’ll have to experiment with some fixes.

.@Simeon Yeah, if you read the image back in it’s 1024x1024. And if you load up the image that’s saved to Dropbox, you can see that the top 256 pixels are just white / cut off.

The ‘clipping’ issue when rendering to images is also causing me problems. I seek to render to a square image of length math.sqrt(WIDTH^2 + HEIGHT^2), so that I can rotate the image as a sprite about the centre of the viewer.