Coder Social home page Coder Social logo

gnu-octave / octave-qr Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 84 KB

Some Octave/Matlab code to create QR Codes, based upon https://github.com/zxing/zxing.

License: GNU General Public License v3.0

Makefile 0.13% M 19.56% MATLAB 13.73% Java 58.24% Objective-C 8.34%
octave

octave-qr's People

Contributors

siko1056 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

stjordanis

octave-qr's Issues

how can i get the picture

Hi, is my first time in this site and i ask a favor.

When i run your code, i get QRCode code, and i understand that represents the encoded image of the barcode

I'm trying with the next method for get the image:
private static void createQRImage(ByteMatrix matrix) throws WriterException, IOException {
String qrCodeText = "AQUI IRIA LA CADENA LARGA QUE SE SOLICITA";
String filePath = "C:/Users/rcn_f/Desktop/QrDemo.png";
String fileType = "png";
File qrFile = new File(filePath);
QRCodeWriter qrCodeWriter = new QRCodeWriter();
int matrixWidth = matrix.getWidth();
BufferedImage image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);
image.createGraphics();
Graphics2D graphics = (Graphics2D) image.getGraphics();
graphics.setColor(Color.WHITE);
graphics.fillRect(0, 0, matrixWidth, matrixWidth);
// Paint and save the image using the ByteMatrix
graphics.setColor(Color.BLACK);
for (int i = 0; i < matrixWidth; i++) {
for (int j = 0; j < matrixWidth; j++) {
if (byteMatrix.get(i, j)) { // here is my problem i think that i need a sustitute for get (x, y)
graphics.fillRect(i, j, 1, 1);
}
}
}
ImageIO.write(image, fileType, qrFile);
}

I appreciate your help infinitely

Ricardo Curiel
[email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.