void PreserveCustomRenderers() { CustomEntryRenderer.Preserve(); CustomImageRenderer.Preserve(); ZXing.Net.Mobile.Forms.Android.Platform.Init(); }
private static UIImage ScaleImageInRatio(UIImage image, nfloat reqWidth, nfloat reqHeight) { var width = image.Size.Width; var height = image.Size.Height; CustomImageRenderer.GetRatio(width, height, ref reqWidth, ref reqHeight); image = image.Scale(new CGSize(reqWidth, reqHeight)); return(image); }