J2ME resizing images?
Hi.
Loading an image and adding it to a form is quite simple, but is there a way to resize the image before adding it? I would like to display all images fitting exactly to the display. As far as I know there isn't even a way to learn the screen dimension without a canvas.
The only way I see is creating a canvas to get the screenwidth and height and then writing my own algorithm to resize the picture.
Any suggestions?
Thanks!
Generally, a developer will make a JAR specifically for a given device, after having resized all the images appropriately.
Memory hungry MIDP 2.0 image resizing, if it helps.
And yeah, most games and apps come in device specific (or device class specific) versions so no resizing is needed.
shmoove
And yeah, most games and apps come in device specific (or device class specific) versions so no resizing is needed.
shmoove
well thats just a stupid waste of developement time :/
[Added:] Can you edit the .jar file whilst its in use? (by the application itself). I would imagine you can't easily (else RMS would be pointless) but can you at least remove/delete files located in the .jar file?
If you could -> Ship one .jar file for every device, with one set of the textures included. When the application is first run on an end device, resize all the textures depending on that phones screen capacities and save them to the RMS (or, if possible the .jar) and remove the textures in the .jar file.
Erm.. actually - can't you start the textures off in the RMS anyway?
[Added:] Can you edit the .jar file whilst its in use? (by the application itself). I would imagine you can't easily (else RMS would be pointless) but can you at least remove/delete files located in the .jar file?
If you could -> Ship one .jar file for every device, with one set of the textures included. When the application is first run on an end device, resize all the textures depending on that phones screen capacities and save them to the RMS (or, if possible the .jar) and remove the textures in the .jar file.
Erm.. actually - can't you start the textures off in the RMS anyway?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement