Type mismatch: cannot convert from ByteMatrix to BitMatrix

前端 未结 3 462
孤城傲影
孤城傲影 2021-01-26 13:00

I am creating a QR code generator program in JAVA using ZXING library. The program is

import com.google.zxing.BarcodeFormat;
import com.google.zxing.WriterExcept         


        
3条回答
  •  面向向阳花
    2021-01-26 13:33

    Never used this library myself, but reading the errormessage I would assume that you have to problem that you want to store byte in bits. The problem will be that a byte is build up by multiple bits so you cannot represent a byte via only one bit.

    Store your encode data into an ByteMatrix and then read this post:

    • QR Code encoding and decoding using zxing

    to finish things off.

提交回复
热议问题