File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes unable to display image in nokia 6630 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "unable to display image in nokia 6630" Watch "unable to display image in nokia 6630" New topic
Author

unable to display image in nokia 6630

saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25


I am unable to display an image on a Nokia 6630 or a 6680 using the code above. However the image is displayed on a Nokia 6600. Has anyone else encountered the same problem? Is there another way to display an image in the Canvas class?
[ May 23, 2006: Message edited by: saad sal ]
Pankaj Bisaria
Greenhorn

Joined: May 20, 2006
Posts: 4
Please specify the image file extention.
saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
i am using a .png image, but i dont think that even using a jpeg image would make a difference
[ May 25, 2006: Message edited by: saad sal ]
Ramender Mall
Ranch Hand

Joined: Sep 08, 2005
Posts: 311
Originally posted by saad sal:
i am using a .png image, but i dont think that even using a jpeg image would make a difference

[ May 25, 2006: Message edited by: saad sal ]


So what kind of exception does the drawImage() method throw, if it throws any?
And how are you creating the image, by URL or by bytes?

Try to debug it on handset and make the exception appear on the screen. Then it will be easier to find the problem. (Of Course, IF you have not done that already)

- Ramy..
saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
thanks I solved the problem. There was nothing wrong with the drawImage method after all.
Ramender Mall
Ranch Hand

Joined: Sep 08, 2005
Posts: 311
Originally posted by saad sal:
thanks I solved the problem. There was nothing wrong with the drawImage method after all.


What was the issue then? If you could state that here, it may prove helpful to someone else if she encounters the same problem.

- Ramy..
saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
well, at first i thought that it was a synchronizing problem, and it was to some extent. However later I found out that my first guess was right. It was the drawImage call that was throwing the exception. Well after finishing synchronizing, all i had to do was to replace the getwidth() and getheight() parameters with image.getwitdh() & image.getheight() etc and the program worked just fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to display image in nokia 6630