Hi all,

I am compressing a bitmap object to OutputStream using "Compress"
function. Here is my code:

try {
                    if (bitmap != null) {
                        bitmap.compress(Bitmap.CompressFormat.JPEG,
100,
                                bytes);
                    } else {
                        Message message = handler.obtainMessage(1,
"false");
                        handler.sendMessage(message);
                        return;
                    }
                } catch (OutOfMemoryError oom) {
                    System.gc();
                    Message message=handler.obtainMessage(1,"false");
                    handler.sendMessage(message);
                    return;
                } catch (NullPointerException npe) {
                    System.gc();
                    Message message = handler.obtainMessage(1,
"false");
                    handler.sendMessage(message);
                    return;
                } catch (Exception e) {
                    System.gc();
                    Message message = handler.obtainMessage(1,
"false");
                    handler.sendMessage(message);
                    return;
                }

when i am running this code on G1 and hero, i am getting a proper
output stream( which i later save to a image file on sdcard). But when
i test this code on Google nexus, i am getting a blurry image after
converting the output stream in an image file.

FYI

OS: Android 1.5; G1 and Hero are on 1.5 OS and nexus is on 2.0

Please help.. is there a known issue in nexus?? or am i doing
something wrong??

-- 
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

Reply via email to