wood burning stoves*
The moose likes Java Micro Edition and the fly likes problem in setting size of image in mobile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "problem in setting size of image in mobile" Watch "problem in setting size of image in mobile" New topic
Author

problem in setting size of image in mobile

feroz pasha
Greenhorn

Joined: Aug 22, 2008
Posts: 13
i am trying to display the google map in mobile using google API as user enter the location it will display the image for that code is

retriveStaticMap(width, height,longitude, latitude,zoom, format);


this.image = Image.createImage(gMap.retrieveStaticImage(35, 35, lanLng[0], lanLng[1], 10, "png32"));

for 35*35 image get displayed
but if i increase size from 35 to 35 it showing illegalArgumentException

as i am using sun java wireless toolkit 2.5.2
emulator as screen size of 240*291

if i resize the image to 240*291 it get blur

so pleeeeeeeeeeeeeeee give me solution
feroz pasha
Greenhorn

Joined: Aug 22, 2008
Posts: 13
STACK TRACE EXCEPTION I AM GETTING PL GIVE SOLUTION

java.lang.IllegalArgumentException:
at javax.microedition.lcdui.ImmutableImage.<init>(+11)
at javax.microedition.lcdui.Image.createImage(+40)
at GoogleMaps.retrieveStaticImage(+28)
at SimpleSlidingCanvas.<init>(+63)
at Example.startApp(+8)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
 
Consider Paul's rocket mass heater.
 
subject: problem in setting size of image in mobile
 
Similar Threads
Get image size
Why did it have to be PNG
Displaying thumb nail image
retrieve size of an image
Image component problem.