Ejemplo n.º 1
0
 def test_code128_image(self):
     # use the same font etc as is in use with squash_barcodes
     font = join(dirname(realpath(knimin.lib.__file__)), 'FreeSans.ttf')
     im = code128_image('000001234', height=100, width=202,
                        thickness=2, show_text=True, quiet_zone=False,
                        font=font)
     self.assertEqual(im.height, 100)
     self.assertEqual(im.width, 202)
Ejemplo n.º 2
0
def get_image(barcodes):
    font = join(dirname(realpath(__file__)), 'FreeSans.ttf')
    for b in barcodes:
        yield code128_image(b,
                            height=100,
                            width=202,
                            font=font,
                            thickness=2,
                            show_text=True,
                            quiet_zone=False)
Ejemplo n.º 3
0
 def test_code128_image(self):
     # use the same font etc as is in use with squash_barcodes
     font = join(dirname(realpath(knimin.lib.__file__)), 'FreeSans.ttf')
     im = code128_image('000001234',
                        height=100,
                        width=202,
                        thickness=2,
                        show_text=True,
                        quiet_zone=False,
                        font=font)
     self.assertEqual(im.height, 100)
     self.assertEqual(im.width, 202)
Ejemplo n.º 4
0
 def mock_get_image2(barcodes):
     font = join(dirname(realpath(__file__)), '../', 'FreeSans.ttf')
     for b in barcodes:
         yield code128_image(b, height=150, width=303, font=font,
                             thickness=2, show_text=True,
                             quiet_zone=False)
Ejemplo n.º 5
0
def get_image(barcodes):
    font = join(dirname(realpath(__file__)), "FreeSans.ttf")
    for b in barcodes:
        yield code128_image(b, height=100, width=202, font=font, thickness=2, show_text=True, quiet_zone=False)