app/src/main/java/fi/finwe/orion360/sdk/pro/examples/MainMenu.java
public static void saveBitmapAsJpg(Bitmap bitmap, String filePath, int quality) {
		if (null == bitmap || null == filePath || filePath.length() == 0) return;
		OutputStream out = null;
		try {
			out = new FileOutputStream(filePath);
			bitmap.compress(Bitmap.CompressFormat.JPEG, quality, out);
			out.flush();
			out.close();
		} catch (FileNotFoundException fnfe) {
            if (null != out) {
                try { out.close(); } catch (IOException e) { Log.e(TAG, "Failed to close stream.");}
            }
            fnfe.printStackTrace();
		} catch (IOException ioe) {
            if (null != out) {
                try { out.close(); } catch (IOException e) { Log.e(TAG, "Failed to close stream.");}
            }
			ioe.printStackTrace();
		}
	}
/**
     * Save given bitmap image to given file path in JPEG format using given compression quality.
     *
     * @param bitmap The bitmap image to save.
     * @param filePath The absolute file path in the local file system where to save the image.
     * @param quality The JPEG algorithm compression quality in range [0-100], 100 = best quality.
     */
Save given bitmap image to given file path in JPEG format using given compression quality.
@param bitmap The bitmap image to save.
@param filePath The absolute file path in the local file system where to save the image.
@param quality The JPEG algorithm compression quality in range [0-100], 100 = best quality.
Save given bitmap image to given file path in JPEG format using given compression quality . @param bitmap The bitmap image to save . @param filePath The absolute file path in the local file system where to save the image . @param quality The JPEG algorithm compression quality in range [ 0 - 100 ] 100 = best quality .
public static void saveBitmapAsJpg(Bitmap bitmap, String filePath, int quality) {
		if (null == bitmap || null == filePath || filePath.length() == 0) return;
		OutputStream out = null;
		try {
			out = new FileOutputStream(filePath);
			bitmap.compress(Bitmap.CompressFormat.JPEG, quality, out);
			out.flush();
			out.close();
		} catch (FileNotFoundException fnfe) {
            if (null != out) {
                try { out.close(); } catch (IOException e) { Log.e(TAG, "Failed to close stream.");}
            }
            fnfe.printStackTrace();
		} catch (IOException ioe) {
            if (null != out) {
                try { out.close(); } catch (IOException e) { Log.e(TAG, "Failed to close stream.");}
            }
			ioe.printStackTrace();
		}
	}
public static void saveBitmapAsJpg ( Bitmap bitmap , String filePath , int quality ) { if ( null == bitmap || null == filePath || filePath . length ( ) == 0 ) return ; OutputStream out = null ; try { out = new FileOutputStream ( filePath ) ; bitmap . compress ( Bitmap . CompressFormat . JPEG , quality , out ) ; out . flush ( ) ; out . close ( ) ; } catch ( FileNotFoundException fnfe ) { if ( null != out ) { try { out . close ( ) ; } catch ( IOException e ) { Log . e ( TAG , "Failed to close stream." ) ; } } fnfe . printStackTrace ( ) ; } catch ( IOException ioe ) { if ( null != out ) { try { out . close ( ) ; } catch ( IOException e ) { Log . e ( TAG , "Failed to close stream." ) ; } } ioe . printStackTrace ( ) ; } }
Save given bitmap image to given file path in JPEG format using given compression quality.
Save given bitmap image to given file path in JPEG format using given compression quality .