Discussion Board

Results 1 to 4 of 4

Thread: Resize image

  1. #1
    Registered User
    Join Date
    Oct 2006

    Resize image

    Hi All,

    There are a lot of examples in internet of how to re-size image but all of those example have the same problem of out of memory exception when it runs on S40 devices.

    So is there a solution to re-size image that we can avoid memory issue.


  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011

    Re: Resize image

    Hi makara,

    The issue for the Out of Memory exceptions has to do with the internal memory representation of the image in combination with the limited heap memory size available on Series 40 (typically 2MB and currently on some devices up to 4MB).
    You can find the maximum heap you can use on your model from the device specification page here.

    You might want to use .png images or scalable 2d vector graphics. An example for the latter can be found here.

  3. #3
    Nokia Developer Champion
    Join Date
    Aug 2008
    Vadodara, India.

    Re: Resize image

    well, you can use some primary software like paint, photoshop, Microsoft Picture Manager etc . They are enough resizing image.

    There is no any special need of resize image software for s40 development.

    @skalogir: is right too.
    Nokia Developer Wiki Moderation team
    World's Greatest Speeches for Windows Phone is now available on WP Marketplace.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Resize image

    I assume Makara wanted to learn if there was a ready-made API for Java ME for decoding and resizing images in a single step (and having overall memory requirements closer to the size of the resized image than to the original).
    As far as I understand, there is no built-in API for that.

    If it is enough to support a limited number of image formats, you can always try searching for something like Java xy decoder, pure Java xy decoder, perhaps combining with ME or MIDP with Google, where xy is a file format you need. Then you will usually have something to start with, however the resizing feature still has to be added, and such codes may rely on API-s which are not necessarily available on Java ME. For example even a .png requires a deflater (some alternatives are here: http://stackoverflow.com/questions/1...p-j2me-library), and .png is a very simple format.

    Chintan, do you really have that set of software running on your S40 devices?

Similar Threads

  1. How to RESIZE IMAGE
    By narendrachinni in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-01, 09:22
  2. Image resize
    By athir.gillani in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-07-14, 07:38
  3. Image resize
    By saifulhq in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2008-04-03, 04:55
  4. image resize
    By dukedosa in forum Mobile Java General
    Replies: 4
    Last Post: 2004-07-26, 14:31
  5. Resize the image
    By johncsl82 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 9
    Last Post: 2004-02-12, 23:18

Posting Permissions

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