Skip to content

Commit bc51b6e

Browse files
committed
bump to version 1.7
1 parent 0e1f75c commit bc51b6e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

epson_printer/epsonprinter.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import division
22
import math
3+
import io
4+
import base64
35
import numpy as np
46
import usb.core
5-
import itertools
67
from functools import wraps
78
from PIL import Image
89

@@ -268,6 +269,11 @@ def print_image_from_file(self, image_file):
268269
printable_image = PrintableImage.from_image(image)
269270
self.print_image(printable_image)
270271

272+
def print_image_from_buffer(self, data):
273+
image = Image.open(io.BytesIO(base64.b64decode(data)))
274+
printable_image = PrintableImage.from_image(image)
275+
self.print_image(printable_image)
276+
271277
@write_this
272278
def underline_on(self, weight=1):
273279
""" Activate underline

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
from setuptools import setup
33

44
setup(name="python_epson_printer",
5-
version="1.6",
5+
version="1.7",
66
description="A library to control Epson thermal printers based on ESC/POS language",
77
url="https://github.com/benoitguigal/python-epson-printer",
88
author="benoitguigal",
99
author_email="benoit.guigal@gmail.com",
1010
packages=['epson_printer'],
1111
install_requires=[
1212
'pyusb==1.0.0b1',
13-
'Pillow==2.6',
14-
'numpy==1.9.2'
13+
'Pillow==2.6'
1514
])

0 commit comments

Comments
 (0)