public String compress(String imageUri,boolean deleteSourceImage){
  String compressUri=compressImage(imageUri);
  if (deleteSourceImage) {
    File source=new File(getRealPathFromURI(imageUri));
    if (source.exists()) {
      boolean isdeleted=source.delete();
      Log.d(LOG_TAG,(isdeleted) ? "SourceImage File deleted" : "SourceImage File not deleted");
    }
  }
  return compressUri;
}

public String compress ( String imageUri , boolean deleteSourceImage ) { String compressUri = compressImage ( imageUri ) ; if ( deleteSourceImage ) { File source = new File ( getRealPathFromURI ( imageUri ) ) ; if ( source . exists ( ) ) { boolean isdeleted = source . delete ( ) ; Log . d ( LOG_TAG , ( isdeleted ) ? "SourceImage File deleted" : "SourceImage File not deleted" ) ; } } return compressUri ; }
compresses the image at the specified uri string and and return the filepath of the compressed image .
