View Single Post
  #4 (permalink)  
Old 08-08-2007, 01:42 AM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 325
amansundar is on a distinguished road
Default Re: Auto Resize Applications in J2ME ?

hi there,
there is a class provided in motorola sdk com.motorola.extensions.ScalableJPGImage
in which you can scale jpg images to fit correctly in you application needs..
not only for jpg images but for png too...


ScalableJPGImage sImage = ScalableJPGImage.createImage(
"/test.jpg", 10, 10);

where test.jpg is the image in resource folder..

in this example i have set the image size 10 for width and height respectively
it can modified to screen size using GETheight() and getwidth() property
__________________
cheers
Aman
Reply With Quote