File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ circles by reducing this less than the default of ``Decimal(1)``.
211
211
212
212
The ``StyledPilImage `` additionally accepts an optional ``color_mask ``
213
213
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.
215
215
216
216
Other color masks:
217
217
@@ -232,7 +232,7 @@ and an embedded image:
232
232
233
233
img_1 = qr.make_image(image_factory = StyledPilImage, module_drawer = RoundedModuleDrawer())
234
234
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" )
236
236
237
237
Examples
238
238
========
Original file line number Diff line number Diff line change @@ -41,11 +41,18 @@ class StyledPilImage(qrcode.image.base.BaseImageWithDrawer):
41
41
42
42
def __init__ (self , * args , ** kwargs ):
43
43
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 ))
47
53
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 )
49
56
)
50
57
if not self .embeded_image and embeded_image_path :
51
58
self .embeded_image = Image .open (embeded_image_path )
You can’t perform that action at this time.
0 commit comments