| Reply | « Previous Thread | Next Thread » |
|
hi...
anyone know how to resize the image using pure J2ME code? Thanks... |
|
Hello
Because Java MIDP does not provide any magical methods for resize the images (png format) you have to make your own algorithm for it. |
|
are there any non-magical methods?
|
|
I'm still looking for one.........
|
|
so, if i understand, there isn't a metod to resize loaded images from the jar files???
|
|
You're correct.
Unless you use a third party device extension API, such as the Nokia UI, you cannot resize png images you load into Image objects. You can't get at the pixel data in order to process it as part of a re-size operation. Anything where you can access individual pixels in images will let you scale and resize them. The Nokia UI or MIDP 2.0 for example. You still need to write the scaling code yourself though. Cheers, Steve |
|
Not necesarilly.
If you understand the PNG file format well enough you could write some standard MIDP code to resize the image by reading the file directly into a byte array or something instead of an Image. I'd hate to be the one to try that, but if anyone is up for the challenge info on PNG can be found here: url=http://www.libpng.org/pub/png/ shmoove |
|
Not necesarilly. If you understand the file format for PNG images well enough you can probably write some standard MIDP code to resize the images, by reading the information directly from the file into a byte array or something. I'd hate to be the one who has to try, but if anyone is brave enough here you can probably find the information you need.
shmoove |
|
Not necesarilly.
If you understand the PNG file format well enough you could write some standard MIDP code to resize the image by reading the file directly into a byte array or something instead of an Image. I'd hate to be the one to try that, but if anyone is up for the challenge info on PNG can be found here: url=http://www.libpng.org/pub/png/ shmoove |
|
Their is another option use the Image Transcoder gateway from Image Habitat - www.imagehabitat.com. The gateway reads the phone charateristics and scales an existing image on the fly.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|