Lossless compression of biomedical images using block-based arithmetic encoding employing resolution independent gradient edge detector