Sign in to follow this  
Farzelhaar

J2ME resizing images?

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Generally, a developer will make a JAR specifically for a given device, after having resized all the images appropriately.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this