Пример #1
0
    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
Пример #2
0
 def get_ascii(self):
     """Return an ascii representation of the matrix"""
     qrc = QRCodeRenderer(self.matrix)
     return qrc.get_ascii()
Пример #3
0
    def save(self, filename, cellsize=5):
        """Write the matrix out to an image file"""

        qrc = QRCodeRenderer(self.matrix)
        qrc.write_file(cellsize, filename)