Skip to content

Commit

Permalink
Fixed wording and markup
Browse files Browse the repository at this point in the history
  • Loading branch information
heuer committed Oct 21, 2022
1 parent 374a1c3 commit 3ab9d44
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/pillow-qrcodes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ All PNG images can be opened by the Pillow library:
>>> out.seek(0) # Important to let PIL / Pillow load the image
>>> img = Image.open(out) # Done, do what ever you want with the PIL/Pillow image
Convert QR code to RGB(A)
-------------------------

Expand All @@ -29,15 +30,15 @@ image into a RGB or RGBA image:
.. code-block:: python
>>> img = Image.open(out).convert('RGB') # We want to use Pillow with colors
>>> # Almost useless if Segno uses no transparency or if further processing requires no transparency / alpha channel
>>> # Only necessary if further processing requires transparency / an alpha channel
>>> img = Image.open(out).convert('RGBA')
Add a logo to a QR code
_______________________
-----------------------

A common request to add a logo or any kind of other picture to the QR code is beyond the purpose of
this library since it requires more image processing and more advanced 3rd party libraries.
this library since it requires 3rd party libraries.
The following code provides an example how to use Pillow to add a logo to the center
of a QR code.

Expand All @@ -63,3 +64,4 @@ of a QR code.
img.paste(logo_img, box)
img.save('qrcode_with_logo.png')

0 comments on commit 3ab9d44

Please sign in to comment.