91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.26MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-08-13
  • 語言: Java
  • 標簽: 二維碼??

資源簡介

java生成二維碼實例+jar包,希望能給需要的人帶來幫助

資源截圖

代碼片段和文件信息

package?com.han.demo;

import?java.awt.Graphics2D;
import?java.awt.geom.AffineTransform;
import?java.awt.image.BufferedImage;

import?com.google.zxing.LuminanceSource;

public?class?BufferedImageLuminanceSource?extends?LuminanceSource?{

private?final?BufferedImage?image;
private?final?int?left;
private?final?int?top;

public?BufferedImageLuminanceSource(BufferedImage?image)?{
this(image?0?0?image.getWidth()?image.getHeight());
}

public?BufferedImageLuminanceSource(BufferedImage?image?int?left?int?top
int?width?int?height)?{
super(width?height);

int?sourceWidth?=?image.getWidth();
int?sourceHeight?=?image.getHeight();
if?(left?+?width?>?sourceWidth?||?top?+?height?>?sourceHeight)?{
throw?new?IllegalArgumentException(
“Crop?rectangle?does?not?fit?within?image?data.“);
}

for?(int?y?=?top;?y? for?(int?x?=?left;?x? if?((image.getRGB(x?y)?&?0xFF000000)?==?0)?{
image.setRGB(x?y?0xFFFFFFFF);?//?=?white
}
}
}

this.image?=?new?BufferedImage(sourceWidth?sourceHeight
BufferedImage.TYPE_BYTE_GRAY);
this.image.getGraphics().drawImage(image?0?0?null);
this.left?=?left;
this.top?=?top;
}

@Override
public?byte[]?getRow(int?y?byte[]?row)?{
if?(y?=?getHeight())?{
throw?new?IllegalArgumentException(
“Requested?row?is?outside?the?image:?“?+?y);
}
int?width?=?getWidth();
if?(row?==?null?||?row.length? row?=?new?byte[width];
}
image.getRaster().getDataElements(left?top?+?y?width?1?row);
return?row;
}

@Override
public?byte[]?getMatrix()?{
int?width?=?getWidth();
int?height?=?getHeight();
int?area?=?width?*?height;
byte[]?matrix?=?new?byte[area];
image.getRaster().getDataElements(left?top?width?height?matrix);
return?matrix;
}

@Override
public?boolean?isCropSupported()?{
return?true;
}

@Override
public?LuminanceSource?crop(int?left?int?top?int?width?int?height)?{
return?new?BufferedImageLuminanceSource(image?this.left?+?left
this.top?+?top?width?height);
}

@Override
public?boolean?isRotateSupported()?{
return?true;
}

@Override
public?LuminanceSource?rotateCounterClockwise()?{

int?sourceWidth?=?image.getWidth();
int?sourceHeight?=?image.getHeight();

AffineTransform?transform?=?new?AffineTransform(0.0?-1.0?1.0?0.0
0.0?sourceWidth);

BufferedImage?rotatedImage?=?new?BufferedImage(sourceHeight
sourceWidth?BufferedImage.TYPE_BYTE_GRAY);

Graphics2D?g?=?rotatedImage.createGraphics();
g.drawImage(image?transform?null);
g.dispose();

int?width?=?getWidth();
return?new?BufferedImageLuminanceSource(rotatedImage?top?sourceWidth
-?(left?+?width)?getHeight()?width);
}

}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????1038000??2016-02-22?16:26??Qrcode_swetake.jar

?????文件????????532??2016-02-22?15:06??demo\.classpath

?????文件????????380??2016-02-22?16:29??demo\.project

?????文件????????598??2016-02-22?14:12??demo\.settings\org.eclipse.jdt.core.prefs

?????文件???????3305??2016-02-22?16:29??demo\bin\com\han\demo\BufferedImageLuminanceSource.class

?????文件???????2218??2016-02-22?16:29??demo\bin\com\han\demo\MatrixToImageWriter.class

?????文件???????1772??2016-02-22?16:29??demo\bin\com\han\demo\MyTest.class

?????文件?????538421??2016-02-22?14:59??demo\lib\core-3.1.0.jar

?????文件???????2867??2016-02-22?15:22??demo\src\com\han\demo\BufferedImageLuminanceSource.java

?????文件???????1524??2016-02-22?15:25??demo\src\com\han\demo\MatrixToImageWriter.java

?????文件???????1021??2016-02-22?16:28??demo\src\com\han\demo\MyTest.java

?????文件?????538421??2016-02-22?11:40??core-3.1.0.jar

?????文件?????457507??2016-02-22?11:40??core-3.1.0-sources.jar

?????目錄??????????0??2016-02-22?16:29??demo\bin\com\han\demo

?????目錄??????????0??2016-02-22?16:29??demo\src\com\han\demo

?????目錄??????????0??2016-02-22?16:29??demo\bin\com\han

?????目錄??????????0??2016-02-22?16:29??demo\src\com\han

?????目錄??????????0??2016-02-22?16:29??demo\bin\com

?????目錄??????????0??2016-02-22?16:29??demo\src\com

?????目錄??????????0??2016-02-22?16:29??demo\.settings

?????目錄??????????0??2016-02-22?16:29??demo\bin

?????目錄??????????0??2016-02-22?16:29??demo\lib

?????目錄??????????0??2016-02-22?16:29??demo\src

?????目錄??????????0??2016-02-22?16:29??demo

-----------?---------??----------?-----??----

??????????????2586566????????????????????24


評論

共有 條評論