Hi,
I have a case where I need to retrieve the bitmap from an ImageView
and write that bitmap to a file so that I can later on retrieve it
back again and set it on a new ImageView. I do this using
bitmap.compress() method. However, the problem is that after I do this
about 5 times, the quality of the Bitmap degenerates badly. The format
I use for the bitmap.compress() is JPEG with the quality as 100. In my
mind 100 would mean no compression of the source bitmap and that the
bitmap should be lossless, but it doesnt seem to be that way. Is this
a bug or is this how it is meant to be?
I want a lossless compression and I tried to use PNG as the format
with bitmap.compress() but that doesnt seem to work either. After
digging around I found out that PNG encoding is not supported, which
basically leads me to believe there is no way of storing (in a
lossless way) a bitmap - isnt that weird?
http://developer.android.com/guide/appendix/media-formats.html
How else can I achieve this lossless writing of bitmap to the file.
Why doesn the Bitmap class simply have an encode() method to write the
bitmap in memory as is?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---