onflycompress System.gc(); Bitmap b = null; mParameters = mPreview.getCameraParameters(); Size s = mParameters.getPreviewSize(); String TAG = "GetPic"; Rect rect = new Rect(left,top,right,bottom); YuvImage yuvimage = new YuvImage(data, ImageFormat.NV21, s.width, s.height, null); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); yuvimage.compressToJpeg(rect, 100, outStream); // make JPG b = BitmapFactory.decodeByteArray(outStream.toByteArray(), 0, outStream.size()); // decode JPG onflycompress How to get it for free? onflycompress yuvimage = null; outStream = null; System.gc(); savePhoto(b); 09-15 00:19:49.607: D/dalvikvm(10765): GC_EXPLICIT freed 164K, 3% free 9673K/9876K, paused 4ms+3ms, total 38ms 09-15 00:19:49.615: D/skia(10765): onFlyCompress 09-15 00:19:49.615: A/libc(10765): Fatal signal 11 (SIGSEGV) at 0x4206872b (code=2), thread 10765 (ple.mycameraapp) onflycompress