Bitmap .compress() returning false
Posted
by Tsimmi
on Stack Overflow
See other posts from Stack Overflow
or by Tsimmi
Published on 2010-06-14T16:31:10Z
Indexed on
2010/06/14
16:42 UTC
Read the original article
Hit count: 244
Hi!
The next call to Bitmap.compress(),
has a different behavior on the Emulator and on a real device.
In the Emulator, result is true,
and in a real device the same call returns false.
FileOutputStream fos = new FileOutputStream(destinationFile, true);
boolean result = myBitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
The thing is that on the emulator
this is working great,
on a real device ( a HERO) when calling .compress()
,
this returns false, witch means that it was unable to convert the image properly.
Why is this?
Thank you
© Stack Overflow or respective owner