Package com.google.zxing

Examples of com.google.zxing.MultiFormatWriter.encode()


        // set values
        final String type = this.params.getType().toString();
       
        // create code image 
        final BitMatrix matrix = writer.encode(
                payload,
                this.params.getFormat(),
                this.params.getWidth(),
                this.params.getHeight(),
                writerHintMap);
View Full Code Here


                   
                  }
                 
                  ByteMatrix bm;                 
                  try{
                     bm = writer.encode(contents, format, width, height,hints);
                  }catch(ClassCastException cce){
                    throw new Exception("ZXing Barcode Writer FAILURE - try different paramteres and pray");
                  }
                  //Bitmap b = BarcodeBitmap.createBitmap(bm,0);
                  Bitmap b = new Bitmap(width,height);
View Full Code Here

        // set values
        final String type = this.params.getType().toString();
       
        // create code image 
        final BitMatrix matrix = writer.encode(
                payload,
                this.params.getFormat(),
                this.params.getWidth(),
                this.params.getHeight(),
                writerHintMap);
View Full Code Here

            Map<EncodeHintType, Object> hints = new EnumMap<EncodeHintType, Object>(EncodeHintType.class);
            hints.put(EncodeHintType.CHARACTER_SET, "ISO-8859-1");
            QRCode code = Encoder.encode(paymentString, ErrorCorrectionLevel.M, hints);
            hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
            barsize = size / (code.getMatrix().getWidth() + 8);
            matrix = writer.encode(paymentString, com.google.zxing.BarcodeFormat.QR_CODE, w, h, hints);
        } catch (com.google.zxing.WriterException e) {
            System.out.println(e.getMessage());
        }

        if (matrix == null || barsize < 0) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.