11-25-2011 02:49 PM
Is there a way to reduce the size(not rescale) of an image??
Havn't found any api.
Can we store an scaled Encoded image in persistent store so that we dont have to scale it everytime while picking up from the persistent store
11-26-2011 09:31 AM
Regarding your first question, it depends on the image that you have. I.E., if you have a bitmap image then you can try and use the PNGEncodedImage.encode to convert the image to a PNG format which probably reduce the image size.
On the other hand, it's usually more efficient to get the image as PNG rather then encoding it.
Regarding your second question, I'm not sure I understand your question.
Your can use the persistent storage to keep your images (scaled or not).
If you are keeping them scaled but you need to rescale them again, there might be a problem with your code.
11-27-2011 02:45 PM
Thanks for the reply.
the problem is that in persistent store we can only store data that are persistable so we have to store the image in form of byte array or string. Currently using EncodedImage.getData to get the image in byte  form but it return the decodedd image so the image is again converted to original size.