Discussion Board

Results 1 to 13 of 13

Thread: resize picture

Hybrid View

  1. #1
    Registered User bennet_chen's Avatar
    Join Date
    Mar 2003
    Posts
    10
    Hi,

    Can I resize a png file at run time?

    For example, I have a png file , 100x100 pixels. After Load,

    I want to change it to 50x50 pixels, but not half-part of the

    picture.

    Anyone know how to do ?

    Thanks.

  2. #2

  3. #3
    Registered User bennet_chen's Avatar
    Join Date
    Mar 2003
    Posts
    10
    shmoove:

    Thanks a lot.

    It is useful for me.

  4. #4
    Registered User fmx's Avatar
    Join Date
    Jun 2003
    Posts
    12
    for example, from 100x100 resize to 120x120?

  5. #5
    Super Contributor shmoove's Avatar
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Sure, why not.
    The method has one parameter for the original Image(a 100x100 Image in your case), and two ints for the desired width and height(120 in your case).

  6. #6
    Registered User fmx's Avatar
    Join Date
    Jun 2003
    Posts
    12
    Greate, it works.
    Then I'm wondering if I can use this way to save jar space, my idea is making image small, for example 10x10, then in the program I can use this resize picture function to enlarge the image to the size I want, for example 30x30. if it's possible, then I can save jar file space. would you please tell me if it's a good idea to do so?thanks a lot.

  7. #7
    Super Contributor shmoove's Avatar
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    You can do it but you will have images with lower resolution, so they will not look as good.

  8. #8
    Registered User fmx's Avatar
    Join Date
    Jun 2003
    Posts
    12
    since doing resize picture will lose resolution of the picture?
    then is it possible to resize a picture without losing resolution?
    anyway it's not a problem that i need to resolve in my development, only i'm interested to find out ^o^, thanks a lot.

  9. #9
    Registered User SenseiTG's Avatar
    Join Date
    Jul 2003
    Posts
    18
    When you change your original picture to a smaller size alot of the image data is lost since there are no longer as many pixels to represent the image data, hence the smaller file since.

    It is not generally possible to recover this lost data and therefore when you resize the image to its original size it will never look as good as the original.

    So the anwer would be no, you cannot reduce the size of your .jar file in this way while maintaining the same quality graphics.

  10. #10
    Registered User bennet_chen's Avatar
    Join Date
    Mar 2003
    Posts
    10
    Hi, everyone,


    I have test the funciton before. I found the limit of the size is

    176 x 176.

    I have only test it by 7210 simulator.

    Does everyone know how to enlarge it to 500 x 500?

    Thanks.

  11. #11
    Regular Contributor yowchuan's Avatar
    Join Date
    Mar 2003
    Location
    Kluang
    Posts
    143
    What about if I have the same 100 px * 100 px and wants to resize to 50 px * 30 px, without distortion of the actual image?

    Cheers,
    YC

  12. #12
    Registered User cashgoh's Avatar
    Join Date
    Sep 2006
    Posts
    24
    hi there, the link seen like having error is there other link available! need to resize jpg picture

  13. #13
    Super Contributor peterblazejewicz's Avatar
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699
    hi,
    that's quite old thread where you've looked,
    next time use search feature, its quite common question,
    for example first one from search results I've done againts forum:
    http://discussion.forum.nokia.com/fo...t=image+resize

    regards,
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved