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)``.
211211
212212The ``StyledPilImage `` additionally accepts an optional ``color_mask ``
213213parameter 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
216216Other 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========
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments