I Have a J2ME image stored as an integer array.
Can anyone tell me how to resize this image (make it smaller)?
Do I need an interpolator for this?
Thanks,
Drew
I Have a J2ME image stored as an integer array.
Can anyone tell me how to resize this image (make it smaller)?
Do I need an interpolator for this?
Thanks,
Drew
[quote]I Have a J2ME image stored as an integer array.
[/quote]
You mean the array has the pixel data?
Then what you need is to implement bilinear interpolation. You have to do it yourself becuase there are no built in methods, unless you use some extension API that’s device specific (the Motorola Gaming API has functions to resize pngs for example).
shmoove
Not possible with pure MIDP 1.0 tho, is it?
Possible, but very slowly and with bad quality.
The second option would be to write a png encoder/decoder that can get the pixel data from a byte array that represents a png image. Possible, but very hard, will probably consume a lot of resources, and still be slow. But at least you can make quality resizes (how much quality is up to you, with the filtering algorithms).
shmoove