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
Anyone know how to do ?
Thanks a lot.
It is useful for me.
is it possible to resize to bigger size?
for example, from 100x100 resize to 120x120?
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).
can I use this way to save jar space?
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.
it means it's not an encouraged way to do so?
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.
It all comes down to pixels
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.
limit of the program
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?
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?
Re: resize picture
hi there, the link seen like having error is there other link available! need to resize jpg picture
Re: resize picture
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: