one thing i want to ask that Is it any delay due to this  
YuvImage.compressToJpeg compression. i mean it can send all the frame to 
network or it can miss some frames?? 
May i want to think towards this?? sorry for my English.


thanks

> Subject: Re: [android-developers] How to compress images in onPreviewframe??
> From: [email protected]
> Date: Thu, 12 Jan 2012 17:05:43 +0200
> To: [email protected]
> 
> 
> On Jan 12, 2012, at 4:52 PM, Muhammad UMER wrote:
> 
> >                 Rect rect = new Rect(0, 0, w, h);
> >                 ByteArrayOutputStream output_stream = new 
> > ByteArrayOutputStream();
> >                 yuv_image.compressToJpeg(rect, 100, output_stream);
> >                 byte[] byt=output_stream.toByteArray();
> 
> Since you're using YuvImage.compressToJpeg, you don't need to use Bitmap at 
> all. Just change current compression quality 100 to 0, and most importantly, 
> you have to drop image size much lower than QVGA. There really isn't much you 
> can do within 2-3KB range.
> 
> --
> H
> 
> -- 
> 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
                                          

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