Is there a maximum size that a mutable image can have?
I am creating a mutable image in which i draw the contents of a text file. The width of the image is equal with the screen's width while the height of the image depends on the amount of text that is read from the file. A lot of text, results in a large image height (=m_lastLineY).
I am testing the application on a Blackberry 9700 simulator. When the text that is read from the file is small, the image is created and displayed correctly. However, when the file contains a lot of text (imgHeight = 6900), an exception is thrown in
PHP Code:
graphics = im.getGraphics();
Is this because of the image height? The same thing works fine on a lot of sony ericsson and nokia emulators.
PHP Code:
m_screenWidth = midlet.getWidth();
m_lastLineY = getLastLineCoordinate(m_text, m_leftMargin, m_topMargin, m_screenWidth);
// Create mutable image
im = Image.createImage(m_screenWidth, m_lastLineY);
int imgWidth = im.getWidth();
int imgHeight = im.getHeight();
Graphics graphics = null;
// Get graphics object to draw onto the image
try {
graphics = im.getGraphics();
} catch (Exception e) {
}
I am using lwuit for the image. This is not the problem though since I tried it with lcdui.Image and I get the same error.