I have implemented barcode scanner in my xamarin application using xzing.net.mobile.forms component.which gives me bar code number. but if i want to capture image also at same time of scanning .is there any other plug in available which give me image as well as bar code. Any Help Appreciated. Thanks in Advance.
I think you can use ZXing.Mobile.BarcodeWriter (It should exists also for Xamarin Forms)
public static ImageSource QR(string data, int w, int h, int m) {
var gen = new BarcodeWriter {
Format = BarcodeFormat.QR_CODE,
Options = new ZXing.Common.EncodingOptions {
Height = h,
Width = w,
Margin = m
}
};
var bytes = gen.Write(data);
return ImageSource.FromStream(() => new MemoryStream(bytes));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With