Hi,
-- I am not able to display the image,after converting to bitmap ,i am getting the below error
--
/skia(3679): --- decoder->decode returned false
i am using the below class
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
public class PlurkInputStream extends FilterInputStream {
protected PlurkInputStream(InputStream in) {
super(in);
System.out.println("inside constructor");
}
public int read(byte[] buffer, int offset, int count)
throws IOException {
int ret = super.read(buffer, offset, count);
System.out.println("inside read");
for ( int i = 2; i < buffer.length; i++ ) {
if ( buffer[i - 2] == 0x2c && buffer[i - 1] == 0x05
&& buffer[i] == 0 ) {
buffer[i - 1] = 0;
}
}
return ret;
}
}
and i am calling it as
InputStream in =openHttpConnection(urlstr);
Bitmap bitmap = BitmapFactory.decodeStream(new PlurkInputStream(in));
Please reply :-) Thanks in advance
Regards,
Vani Reddy
Vani Reddy
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment