資源簡介
參照csdn上一位大牛對二維碼區域上色的思路,自己寫的使用區域增長法二維碼上色。希望有人在這基礎上完成二維碼圓角化。
代碼片段和文件信息
package?org.jhc.qr;
import?java.awt.image.BufferedImage;
import?java.io.File;
import?java.io.IOException;
import?javax.imageio.ImageIO;
public?class?PaintByteData?{
public?void?paint(int[]?pixels?int?width?int?height?String?fileName
String?filePath)?{
File?file1?=?new?File(filePath?fileName);
BufferedImage?image?=?new?BufferedImage(width?height
BufferedImage.TYPE_INT_RGB);
image.getRaster().setDataElements(0?0?width?height?pixels);
try?{
ImageIO.write(image?“jpg“?file1);
}?catch?(IOException?e)?{
e.printStackTrace();
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????353??2014-04-01?17:23??.classpath
?????文件?????????378??2014-04-01?17:10??.project
?????文件?????????598??2014-04-01?17:10??.settings\org.eclipse.jdt.core.prefs
?????文件??????351914??2014-04-01?17:22??bin\core.jar
?????文件????????1274??2014-04-01?17:23??bin\org\jhc\qr\PaintByteData.class
?????文件????????4815??2014-04-01?17:24??bin\org\jhc\qr\QREnCoding.class
?????文件????????3972??2014-04-01?17:23??bin\org\jhc\qr\RegionGrow.class
?????文件?????????616??2014-04-01?17:23??bin\org\jhc\qr\common\ColorType.class
?????文件????????1018??2014-04-01?17:23??bin\org\jhc\qr\common\Point.class
?????文件????????1470??2014-04-01?17:23??bin\org\jhc\qr\common\QRBean.class
?????文件?????????917??2014-04-01?17:23??bin\org\jhc\qr\test\MainTest.class
?????文件??????351914??2014-04-01?17:22??src\core.jar
?????文件?????????596??2014-04-01?17:12??src\org\jhc\qr\PaintByteData.java
?????文件????????3802??2014-04-01?17:24??src\org\jhc\qr\QREnCoding.java
?????文件????????4663??2014-04-01?17:23??src\org\jhc\qr\RegionGrow.java
?????文件?????????322??2014-04-01?17:19??src\org\jhc\qr\common\ColorType.java
?????文件?????????952??2014-04-01?17:17??src\org\jhc\qr\common\Point.java
?????文件????????1421??2014-04-01?17:16??src\org\jhc\qr\common\QRBean.java
?????文件?????????404??2014-04-01?17:21??src\org\jhc\qr\test\MainTest.java
評論
共有 條評論