Skip to content

Commit d2674f8

Browse files
authored
Merge pull request #383 from btimby/spelling
Allow correct spelling of parameters.
2 parents 2ced7b4 + 42ee50e commit d2674f8

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ circles by reducing this less than the default of ``Decimal(1)``.
211211

212212
The ``StyledPilImage`` additionally accepts an optional ``color_mask``
213213
parameter to change the colors of the QR Code, and an optional
214-
``embeded_image_path`` to embed an image in the center of the code.
214+
``embedded_image_path`` to embed an image in the center of the code.
215215

216216
Other color masks:
217217

@@ -232,7 +232,7 @@ and an embedded image:
232232
233233
img_1 = qr.make_image(image_factory=StyledPilImage, module_drawer=RoundedModuleDrawer())
234234
img_2 = qr.make_image(image_factory=StyledPilImage, color_mask=RadialGradiantColorMask())
235-
img_3 = qr.make_image(image_factory=StyledPilImage, embeded_image_path="/path/to/image.png")
235+
img_3 = qr.make_image(image_factory=StyledPilImage, embedded_image_path="/path/to/image.png")
236236
237237
Examples
238238
========

qrcode/image/styledpil.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,18 @@ class StyledPilImage(qrcode.image.base.BaseImageWithDrawer):
4141

4242
def __init__(self, *args, **kwargs):
4343
self.color_mask = kwargs.get("color_mask", SolidFillColorMask())
44-
embeded_image_path = kwargs.get("embeded_image_path", None)
45-
self.embeded_image = kwargs.get("embeded_image", None)
46-
self.embeded_image_ratio = kwargs.get("embeded_image_ratio", 0.25)
44+
embeded_image_path = kwargs.get(
45+
"embeded_image_path",
46+
kwargs.get("embedded_image_path", None))
47+
self.embeded_image = kwargs.get(
48+
"embeded_image",
49+
kwargs.get("embedded_image", None))
50+
self.embeded_image_ratio = kwargs.get(
51+
"embeded_image_ratio",
52+
kwargs.get("embedded_image_ratio", 0.25))
4753
self.embeded_image_resample = kwargs.get(
48-
"embeded_image_resample", Image.Resampling.LANCZOS
54+
"embeded_image_resample",
55+
kwargs.get("embedded_image_resample", Image.Resampling.LANCZOS)
4956
)
5057
if not self.embeded_image and embeded_image_path:
5158
self.embeded_image = Image.open(embeded_image_path)

0 commit comments

Comments
 (0)