This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to display image in nokia 6630

 
saad sal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please specify the image file extention.
 
saad sal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks I solved the problem. There was nothing wrong with the drawImage method after all.
 
Ramender Mall
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic