Reputation: 539
I am trying to open an image in blackberry.
I got this in python - myImage = graphics.Image.open(jobDirectory + "\" + name) and I wish to use this similar thing in Blackberry/ J2ME.
Upvotes: 0
Views: 823
Reputation: 59650
In J2ME you can display image in following two ways:
Image image = Image.createImage(path_to_img+"/img.PNG");
g.drawImage(image, x, y, Graphics.TOP | Graphics.LEFT); // 1) Use drawImage function.
Sprite mainSprite = new Sprite(image); // 2) Use Sprite to display your image.
mainSprite.setRefPixelPosition(x, y);
mainSprite.paint(g);
Hope this helps.
Upvotes: 4