encode Binary
Returns a QR Code representing the specified binary data at the specified error correction level. This function always encodes using the binary segment mode, not any text mode. The maximum number of bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
Return
a QR Code (not null) representing the data
Parameters
data
the binary data to encode (not null)
ecl
the error correction level to use (not null) (boostable)
Throws
if the data or error correction level is null
if the data fails to fit in the largest version QR Code at the ECL, which means it is too long