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.
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.
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).
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.
You can do it but you will have images with lower resolution, so they will not look as good.
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.
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.
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.
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
hi there, the link seen like having error is there other link available! need to resize jpg picture
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