For a long time did not publish a blog, today sent a Java tool class, suddenly found that the draft box unexpectedly has the previous inventory, one-time hair!!!Catalogue 1. QR code concept 2. development History of QR code 3. Two-dimensional
Scan the code to log on to JAVA and scan java
Reference (Development Platform): https://open.weixin.qq.com/cgi-bin/showdocument? Action = dir_list t = resource/res_list verify = 1 id = open1419425518 lang = zh_CN
Summary (implementation process ):
A. Registration (Pay): Get the appid, secret, and the domain name to jump to after setting the scan
After reading the QR code today, I felt good. I also collected a demo, saying that the demo was actually modified based on the basic functions.
1. Set up the environment. The required jar packages include
Here is the online reference demo.
Where
To make modifications based on the original and open-source packages.
2. QR c
) {File=NewFile ("E:" +file.separator+ "xxx.xxx");//own default storage path} imageio.write (image, format, file); returnfile; } V. Conversion into a streamIf you need to upload to a picture server, you need to convert bufferedimage into stream form /*** @Description: convert bufferedimage-> output stream *@paramimage Two-dimensional code content *@paramformat picture formats such as JPG, GIF, etc. *@paramOutputStream Output Stream *@return * @thro
Step 1 download the zpxing. jar package and load it in (there are many similar jar packages on the Internet. Here we use the jar provided by Google)
QR code tool:
Package com. zpxing. controller; import java. awt. basicStroke; import java. awt. graphics; import java. awt. g
implementation of this method#pragma mark-#pragma mark Nscopying methodThis method needs to be implemented to support the memo-(ID) Copywithzone: (Nszone *) zone{Using the Self class here is a type that you want its subclasses to return as well as subclasses.Yiche *yichecopy = [[Self class]allocwithzone:zone]init];return yichecopy;}The specific scene class will no longer write, mainly to explain the prototype model of a simple example, and then write the time also feel that there are some short
Java uses Zxing to generate a QR code. Zxing is a parsing tool provided by Google for bar code (one-dimensional code and two-dimensional code). It provides a method for generating and parsing
)) { Throw NewIOException ("Could not write an image of format" +format); } } //generate a QR code picture content: Contents, url: Build Path Public Staticstring Genqrcode (String content,string URL) {//Verify that there are folderscreatedir.createdir (URL); String filename=NULL; //picture format of QR codeString format = "png"; Hashtable hints
Source: http://blog.csdn.net/wangpeng047/article/details/7181217 (thanks and respect for the original author)
Normal use of the following code to do the jar package required, free points: http://download.csdn.net/detail/zihan11201120/4969485
1 package com.zihan.org; 2 3 Import Java. text. dateformat; 4 Import Java. text. simpledateformat; 5 import
QR code generation helper class [java] package com. dream. qrcodeen; import java. awt. image. bufferedImage; public class TwoDimensionCodeImage {BufferedImage bufImg; public TwoDimensionCodeImage (BufferedImage bufImg) {this. bufImg = bufImg;} public int getHeight () {return bufImg. getHeight ();} public int getPixel (
QR code creation and scanning, QR code creation and Scanning
Yesterday, we introduced a QR code creation policy. During the test, we found that the generated QR
Thinkphp3.2.3 integrate phpqrcode to generate QR code with logo and qrcode QR code logo
Thinkphp does not contain libraries related to QR codes. Therefore, we can integrate phpqrcode to generate QR codes.
Download phpqrcode
: Http
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.