Use zxing batch in a well-done position on the background map, the specified text content (link address, text, etc.) generated two-dimensional code and placed in the position,
Finally, add the card number.
Steps:
1). Make a good background map, such as:
2). Generate two-dimensional code bufferedimage objects. The code is as follows:
/** * * @Title: Tobufferedimage * @Description: Convert text into QR c
1. For more information about zxing, see http://blog.csdn.net/icash/article/details/7727299.
2. if zxing is used in your project, but after xcdoe is upgraded to 4.5, incompatible pointer types sending 'class' (aka 'class * ') appears *') to Parameter of Type 'id You can use the command to download the latest version: SVN checkout http://zxing.googlecode.com/svn/trunk/Z
If a simple and comprehensive Android project can be analyzed, zxing is a good example.The source code of zxing can be downloaded from Google Code. The entire source code is checked out, which contains the source code of each platform, iOS and Android. Of course, we need Android code. Import the android project to eclipse. After the import is complete, eclipse will display various errors, which are caused b
Android-ZXing QR code scanning problems, androidzxing
In recent work, we need to develop software with the QR code scanning function (based on the ZXing open-source project). Record the problems and hope to help you.
1. First, because scanning requires camera activation, you must add permissions. Otherwise, nothing can be done later.
2. Set the scan box size:
Search for the com.
Using zxing to realize the embedded image of two-dimensional code generator has certain reference value, as follows:
The basic idea is to use the zxing generated two-dimensional code picture, and then read the picture, insert the icon in it, and then the entire output picture.
Recent projects need to generate two-dimensional code, looking for a few examples of synthesis, to make the final effect, two-dime
The example of this article for us to analyze the zxing generation of two-dimensional code of the classic case for your reference, the specific contents are as follows
1, first of all, compile compile ' com.google.zxing:core:3.2.1 '
2. actual combat
public class QRCode {private static int image_halfwidth = 50;//width value, affect middle picture size/** * Generate two-dimensional code, the default size is 500*500 * * @return bit
Map */public s
Viewfinderview customizes the view and implements a simple scanning interface. This article record my understanding of Android camera in the code process. Since I started to write a technical blog, there are many shortcomings in the first two articles.
I wrote them as needed. It is estimated that it is difficult for everyone to have a clear understanding of what I wrote. This article tries to change the style and try to express my understanding, so that everyone can understand it.
Before reading
public static Bitmap Create2dcode (String str) throws Writerexception {Generate a two-dimensional matrix, specify the size of the encoding, do not generate a picture and then zoom, which will blur leading to recognition failurehashtablehints.put (Encodehinttype.character_set, "UTF-8");Bitmatrix matrix = new Multiformatwriter (). Encode (Str,barcodeformat.qr_code, 300, 300,hints);int width = matrix.getwidth ();int height = matrix.getheight ();The two-dimensional matrix is converted into a one-dim
/*New private static final int my_permissions_request_call_camera = 1;//request code, self-defined//new Android6.0 permission check @Override protected void OnStart () {Super.onstart (); if (Build.VERSION.SDK_INT >= build.version_codes. M) {if (Contextcompat.checkselfpermission (this, Manifest.permission.CAMERA)! = Packagemanager.permission_grant ED) {//If there is no authorization, request authorization Activitycompat.requestpermissions (this, new String[]{manifest.permissi On.
Zxing This is Google'sHttp://code.google.com/p/zxing/downloads/listTwo-dimensional code source case Packagecom.utils;ImportJava.awt.image.BufferedImage;ImportJava.awt.image.DataBufferByte;ImportJava.io.File;Importjava.io.IOException;Importjava.util.Date;Importjava.util.Hashtable;ImportJavax.imageio.ImageIO;ImportCom.google.zxing.BarcodeFormat;ImportCom.google.zxing.EncodeHintType;ImportCom.google.zxing.Mult
Program source code and executable file: Http://files.cnblogs.com/rainboy2010/zxingdemo.zipZxing, an extremely powerful bar code parsing class Library, the following explains how to use the Zxing class library to implement sweep sweep function, first put on a:The main code is as follows:1. Get the preview image in the Onpreviewframe method and pass it to Decodehandler to parsepublic void Onpreviewframe (byte[] data, camera camera) {point camerare
First of all, my test scenario is "identify the two-dimensional code printed on paper", look for the QR code in the scan results and identify it, instead of just letting the camera scan the QR code.Zbar and zxing are using their own DLL compiled from GitHub's clone C + + source/interface, which is the default parameterAgain conclusion: measured about thousands of pictures, two of the accuracy of the library is almost (due to the diversity of the pictu
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.