def get_imagedata( self, cellsize=5 ): """Write the matrix out to a PNG bytestream""" qrc = QRCodeRenderer(self.matrix) imagedata = qrc.get_imagedata( cellsize ) self.height = qrc.mtx_size self.width = qrc.mtx_size return imagedata
def get_ascii(self): """Return an ascii representation of the matrix""" qrc = QRCodeRenderer(self.matrix) return qrc.get_ascii()
def save(self, filename, cellsize=5): """Write the matrix out to an image file""" qrc = QRCodeRenderer(self.matrix) qrc.write_file(cellsize, filename)