Code example for Bitmap

Methods: compress

0
                Bitmap b = mTextureView.getBitmap();
                try { 
                    FileOutputStream out = new FileOutputStream(
                            Environment.getExternalStorageDirectory() + "/textureview.png");
                    try { 
                        b.compress(Bitmap.CompressFormat.PNG, 100, out);
                    } finally { 
                        try { 
                            out.close();
                        } catch (IOException e) {
                            // Ignore 
                        } 
                    } 
                } catch (FileNotFoundException e) {
                    // Ignore 
                } 
            } 
        }); 
 
        content.addView(mTextureView, new FrameLayout.LayoutParams(500, 400, Gravity.CENTER));
Contextual code suggestions in your IDE  Get Codota for Java