Skip to content

Instantly share code, notes, and snippets.

@joelrfcosta
Created October 13, 2014 09:25
Show Gist options
  • Save joelrfcosta/7ab05ecbaad7fd92c678 to your computer and use it in GitHub Desktop.
Save joelrfcosta/7ab05ecbaad7fd92c678 to your computer and use it in GitHub Desktop.
Bitmap cameraBmp = MediaStore.Images.Media.getBitmap(
State.mainActivity.getContentResolver(),
Uri.fromFile( Utils.tempFileForAnImage() ) );
cameraBmp = ThumbnailUtils.extractThumbnail(cameraBmp, 320,320);
// NOTE incredibly useful trick for cropping/resizing square
// http://stackoverflow.com/a/17733530/294884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment