×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Malaysia
    Posts
    9

    Resize the image

    hi...

    anyone know how to resize the image using pure J2ME code?

    Thanks...

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    382
    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.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Location
    the wired
    Posts
    4
    are there any non-magical methods?

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    Malaysia
    Posts
    9

    Still looking

    I'm still looking for one.........

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rome, Italy
    Posts
    53
    so, if i understand, there isn't a metod to resize loaded images from the jar files???

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    229
    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

  7. #7
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    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

  8. #8
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    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

  9. #9
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    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

  10. #10
    Registered User
    Join Date
    May 2003
    Posts
    3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •