Tag: qr code

QR中的QR码图像生成器(开源但没有GPL)

我正在寻求java(J2SE)中的开源QR码图像生成器组件,但开源许可证不能是GPL许可证(需要包含在一个紧密的源项目中)。 顺便说一句,我无法从项目访问网络,因此没有Google API。

PDFBox Pdf到图像丢失QR码“ColorSpace Pattern不提供非抚摸颜色”

类似于这个SO PDFBox – PDF到图像丢失条形码 有问题的PDF: https : //drive.google.com/file/d/0B13zTPQR9uxscXRMWjhsZ0doa00/view?usp=sharing 有最小的文本和中等大小的QR码。 我尝试了许多不同的解决方案,使用PDFBox / ImageIO将此PDF页面转换为图像,但到目前为止,结果中始终缺少QR码。 当我使用PDFBox的PDFImageWriter时,我得到这个日志: ColorSpace Pattern doesn’t provide a non-stroking color, using white instead! 我认为这与二维码有关。 这是预期的行为吗? 其他人可以确认PDFBox无法从此PDF中复制QR码吗? 有没有办法使用Java或PDFBox将其转换为图像?

如何在Struts 2中将动作类的QRCode图像发送和显示到JSP

我正在提交一个带有字符串的JSP表单,并且在提交时我正在调用Struts 2操作。 在该操作中,我使用QRGen库创建QRCode图像,如下所示 File QRImg=QRCode.from(“submitted String”).to(ImageType.PNG).withSize(100, 100).file(); 我的JSP表单: Enter Your Name 我的操作映射struts.xml : displayQR.jsp 我的动作类: import java.io.File; import net.glxn.qrgen.QRCode; import net.glxn.qrgen.image.ImageType; import com.opensymphony.xwork2.ActionSupport; public class CreateQRAction extends ActionSupport{ private File QRImg; Private String userName; public String execute() { QRImg=QRCode.from(userName).to(ImageType.PNG).withSize(100, 100).file(); return SUCCESS; } public String getUserName() { return userName; } public void setUserName(String userName) { […]

如何在java中调整图像大小?

你好我有一个二维码图片,我想resize,当我尝试使用这个代码将其调整为一个小图像时,我总是得到一个blury图像,当我扫描它时,二维码不再有效,但是当我使用相同的代码调整大尺寸图像时,它工作正常: public BufferedImage getScaledInstance(BufferedImage img, int targetWidth, int targetHeight, Object hint, boolean higherQuality) { int type = (img.getTransparency() == Transparency.OPAQUE) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB; BufferedImage ret = (BufferedImage)img; int w, h; if (higherQuality) { // Use multi-step technique: start with original size, then // scale down in multiple passes with drawImage() // until the target […]