pycode128.code128_image.Code128Image

class pycode128.code128_image.Code128Image(byte_buffer: bytes, image_height: int = 200, bar_width: int = 5)[source]

Bases: object

Class to convert byte buffer to PIL Image.

__init__(byte_buffer: bytes, image_height: int = 200, bar_width: int = 5)[source]

Initialization.

Parameters
  • byte_buffer – byte buffer from PyCode128 C extension.

  • image_height – height of final image

  • bar_width – width of each single bar

Methods

__init__(byte_buffer[, image_height, bar_width])

Initialization.

get_image()

Retrieve PIL image.

get_image() <module 'PIL.Image' from '/home/runner/work/pycode128/pycode128/.tox/docs/lib/python3.11/site-packages/PIL/Image.py'>[source]

Retrieve PIL image.

Returns

PIL Image object.