Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Barcode Scanner With Image capture in Xamarin.forms [closed]

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.

like image 336
Neelam Prajapati Avatar asked Apr 14 '17 12:04

Neelam Prajapati


1 Answers

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));
    }
like image 115
Alessandro Caliaro Avatar answered Nov 03 '22 00:11

Alessandro Caliaro