src/jpm/dg/ImageHideScreen.java
/**
	 * Load an image from a given Uri.
	 * 
	 * @param sourceUri The Uri of the data.
	 * @param source The data source (cover image or secret image).
	 */
Load an image from a given Uri.

@param sourceUri The Uri of the data.
@param source The data source (cover image or secret image).
Load an image from a given Uri . @param sourceUri The Uri of the data . @param source The data source ( cover image or secret image ) .
private void loadImage(Uri sourceUri, int source) {
		sendBroadcast(new Intent(
				Intent.ACTION_MEDIA_MOUNTED,
				Uri.parse("file://" + Environment.getExternalStorageDirectory())));
		InputStream hostStream = null;
		InputStream secretStream = null;
		try {
			if (secretBitmap != null) {
				secretBitmap.recycle();
				secretBitmap = null;
			}
			if (source == HOST) {
				hostUri = sourceUri;
				hostStream = getContentResolver().openInputStream(hostUri);
				if (hostBitmap != null) {
					hostBitmap.recycle();
					hostBitmap = null;
				}
				hostBitmap = createScaledBitmapFromStream(hostStream, HOST);
				if (hostFromCamera) {
				}
			} else {
				secretUri = sourceUri;
			}
			if (secretUri != null) {
				secretStream = getContentResolver().openInputStream(secretUri);
				secretBitmap = createScaledBitmapFromStream(secretStream,
						SECRET);
				if (secretFromCamera) {
				}
			}
		} catch (Throwable t) {
			Dialogs.showErrorDialog(this, Dialogs.LOAD_ERROR);
		} finally {
			if (hostStream != null)
				try {
					hostStream.close();
				} catch (Exception e) {
				}
			if (secretStream != null)
				try {
					secretStream.close();
				} catch (Exception e) {
				}
		}
		secretImageView.setImageBitmap(secretBitmap);
		hostImageView.setImageBitmap(hostBitmap);
	}
private void loadImage ( Uri sourceUri , int source ) { sendBroadcast ( new Intent ( Intent . ACTION_MEDIA_MOUNTED , Uri . parse ( "file://" + Environment . getExternalStorageDirectory ( ) ) ) ) ; InputStream hostStream = null ; InputStream secretStream = null ; try { if ( secretBitmap != null ) { secretBitmap . recycle ( ) ; secretBitmap = null ; } if ( source == HOST ) { hostUri = sourceUri ; hostStream = getContentResolver ( ) . openInputStream ( hostUri ) ; if ( hostBitmap != null ) { hostBitmap . recycle ( ) ; hostBitmap = null ; } hostBitmap = createScaledBitmapFromStream ( hostStream , HOST ) ; if ( hostFromCamera ) { } } else { secretUri = sourceUri ; } if ( secretUri != null ) { secretStream = getContentResolver ( ) . openInputStream ( secretUri ) ; secretBitmap = createScaledBitmapFromStream ( secretStream , SECRET ) ; if ( secretFromCamera ) { } } } catch ( Throwable t ) { Dialogs . showErrorDialog ( this , Dialogs . LOAD_ERROR ) ; } finally { if ( hostStream != null ) try { hostStream . close ( ) ; } catch ( Exception e ) { } if ( secretStream != null ) try { secretStream . close ( ) ; } catch ( Exception e ) { } } secretImageView . setImageBitmap ( secretBitmap ) ; hostImageView . setImageBitmap ( hostBitmap ) ; }
Load an image from a given Uri.
Load an image from a given Uri .
//hostBitmap = Util.rotateBitmap(this, hostBitmap);
 //secretBitmap = Util.rotateBitmap(this, secretBitmap);
