How large can a panel / canvas be?

Darren69

Member
Licensed User
Longtime User
Hi,

Apologies if I have missed an answer to this else where, I have written a program to draw a bunch of boxes and lines, and wanted to know if there is a limit to how big the canvas could be.

the basic program asks you how big you want the picture to be and then randomly generates coloured boxes and lines to fill your picture.

I am using actual pixels rather than DIP ones, and the image is currently drawn on a panel off screen (shifted to the very right of the activity window with just a few pixels showing so I know its working) and then when its done it saves it and e-mails it.

the program works fine up to around 7400 pixels wide by 1000, anything beyond that and it quits.

So is there a way to draw an unlimited number of pixels (the user doesn't need to see the result of the drawing, its just saved and emailed) or should I be doing it a different way?

thanks in advance.

Darren
 

Darren69

Member
Licensed User
Longtime User
Hi, I sifted through the logs and yes it is an out of memory error, is there a way to allocate more memory to the application, or to use the available storage card as memory for the application?

Or would there be a better way to draw the image?

thanks again
 
Upvote 0

Darren69

Member
Licensed User
Longtime User
The program I am writing generates patterns for LED screens that are pixel mapped, so if the screen is 1920 pixels wide x 1080 pixels high I need to generate a pattern that is 1920 Pixels by 1080 Pixels. It never really needs to be viewed on the device screen, just saved as a PNG that can then be e-mailed out to someone.

This is why I was wondering if the image could be generated with out the need to draw it to the device screen.

A pattern that is 8640 x 1080 pixels saved as PNG from my desktop version is only 344k, so I would assume the one from the device to be about the same, but it wont draw. is there a maximum size in image could be before it crashes, at least that was I could point the user to the desktop version and not the mobile version so I could elegantly trap the error rather than the application just crashing

thanks again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…