next, because using avfoundation has been unable to scan our QR code, and finally decided to use a barcode. I added the EAN13 barcode type (the type we used to generate the barcode) in Avcapturemetadataoutput's metadataobjecttypes, unfortunately, is still not recognized, but Baidu's other EAN13 types of barcodes can
This document describes how to use barcode Xpress to create a QR code.
1. instantiate the writer class you want to create a bar code.
2. Set the value you want to create.
Property
Description
Barcodevalue
This property gets and sets the value of the barcode to be created.
Barcodedata
This property gets and sets the current
Csharp: QR Code Barcode, qrcode
///
///
C # Use the BarcodeControl bar code control to generate a bar code. How can I minimize the size of the generated bar code, because the printing process is too large, which wastes paper
Detune the height and width
C # Winfrom QRcode QR code printing. I know how to print a single bar code when the bar code is connected.
quite high, the API provided by iOS is really very powerful, however, we can do further optimization, will improve efficiency: First ,There is one such attribute in the Avcapturemetadataoutput class (available after IOS7.0): @property(Nonatomic)CGRect rectofinterest; This property roughly means to tell the system that it needs to be aware of the area, most apps have a box in the sweep code UI, reminding you to put the barcode into that area,
Two-dimensional codeTwo-dimensional code (referred to as QR code) is a black-and-white graphic that is distributed on a plane (two-dimensional direction) with a specific geometric pattern.First look at an effect Scan with your phone to see what this code means:)Generate the code for the above code: 1 Static voidgenerateimg ()2 {3Qrencoder Qrencoder =NewQrencoder (ErrorCorrectionLevel.H);4QRCode QRCode = Qrencoder.encode ("Http://www.cnblogs.com/Apha
Enable the mobile phone camera to scan the QR code or complete the operations, mobile phone camera Barcode
(1) download the source code of the QR code library
Link: http://pan.baidu.com/s/1pKQyw2n password: r5bv
After the download is complete, open the libzxing folder and add it to Android Studio. For details, see File ------ New ----- Import Moudle.
(2) cl
,) [Session startrunning];}6, the implementation of the 4th step of the agent method#pragmaMark-avcapturemetadataoutputobjectsdelegate implement this proxy method, (this agent inside this one method)-(void) Captureoutput: (Avcaptureoutput *) captureoutput didoutputmetadataobjects: (Nsarray *) metadataobjects fromConnection :(Avcaptureconnection *) connection{//This method is called after the data is scanned. Because the call is very frequent, it is judged that when the data is captured, the
];Self.previewlayer = preview;6. Start session[Session startrunning];Self.session = session;}#pragma mark-Output proxy methodThis method is recognized in the QRCode, and the conversion is completedIf the content of the QRCode is larger, the longer the conversion takes-(void) Captureoutput: (Avcaptureoutput *) captureoutput didoutputmetadataobjects: (Nsarray *) metadataobjects Fromconnection: (avcaptureconnection *) connection{Frequent scans, invoking proxy methods1. If the scan is complete, stop
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.