Good day.

I try to make a MIDP 2.0 application that load a jpeg image from a network camera and display it on Canvas.
I load image from http ad store it on a byte array, then Image.createImage(data, 0, len); where data is the array and len is the data length.
At the and I make repaint();
On method paint I make g.drawImage(image, 0,0, Graphics.LEFT|Graphics.TOP);

If I try it on Wireless Toolkit 2.2 emulators it run correctly.
On Nokia emulators. Sony-Ercisson MIDP 2.0 emulator and on Wireless Toolkit 2.1 emulators it makes a NullPointer Exception in method paint.
java.lang.NullPointerException
at CanonCamera.ImageCanvas.paint(+28)
at javax.microedition.lcdui.Canvas.callPaint(+80)
at javax.microedition.lcdui.Display.repaint(+78)
at javax.microedition.lcdui.Display.registerNewCurrent(+238)
at javax.microedition.lcdui.Display.screenChange(+55)
at javax.microedition.lcdui.Display$DisplayManagerImpl.screenChange(+5)
at com.sun.midp.lcdui.EmulEventHandler.screenChangeEvent(+24)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+750)

If I try my program On Nokia 6600 device a bad image format error message appears.

I have tried to load the leaf.jpg image from my web site with the program only changing the url.
This file is part of Wireless Toolkit 2.2 PhotoAlbum demo.
In all platforms it run correctly.

Why the most important image has problems?

Best regards.

Stefano Errani