@Nullable private static Bitmap extractThumbnail(Bitmap source,int width,int height){
  return extractThumbnail(source,width,height,OPTIONS_NONE);
}

@ Nullable private static Bitmap extractThumbnail ( Bitmap source , int width , int height ) { return extractThumbnail ( source , width , height , OPTIONS_NONE ) ; }
creates a centered bitmap of the desired size .
