WhyNotHugo / python-barcode

㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.
http://python-barcode.rtfd.io/
MIT License
572 stars 123 forks source link

Allow SVGWriter to avoid having the background element #211

Closed fra87 closed 1 year ago

fra87 commented 1 year ago

With this PR I modified SVGWriter to be able to avoid having the background element on SVG images

If you set the "background" to None or (255,255,255,0) (i.e. transparent) in the writer_options parameter when calling render then the background will not be written in the SVG (instead of having a rectangle).

This is because transparent background does not seem to work in the current library (it is black)

WhyNotHugo commented 1 year ago

Thanks!