Canvas: trying to draw too large

It is probably the image loaded to the canvas imageSprite OBJ_TABLERO on your TABLERO screen

image

Try loading it on screen initialise with a clock timer, to give the canvas some time (@250ms) to set its size before loading the image

4 Likes

If your app has a 1750 by 2500 image, is it intended for a phone the size of a handball court?

3 Likes

Note that just because an image is compressed doesn't imply that it is small. A 1750x2500 pixel image could be fairly small if using PNG compression on an image that is mostly solid colors without a lot of noise. However, in memory it still needs to be held in its uncompressed state, which is roughly 17.5 MB. If you end up loading a few images of this size you will cause the app to run out of memory (Fun fact: my first Android phone allowed apps to use up to 16 MB of RAM).

4 Likes

I think it is solve. Let me explain. when the sprites are loading they go outside of the screen, so my canvas change its size. Let me explain you.

Before the srpites load outside of the canva so I think is the reason of the error.

1 Like

Compressing the sprites less than 10 MB might do the work (fix it).

1 Like

The largest file in the aia is 3.4mb :upside_down_face:

The problem is that it is 7000 pixels high...

2 Likes

what the! 7000?! unbelivable !:rofl::rofl:

it is already solve, the sprites size go outside of the canvas, I resize the sprites and the problem went away

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.