예제 #1
0
 def generate_image(self, chars):
     text_drawings = [
         image.warp(),
         image.rotate(),
         image.offset(),
     ]
     fn = image.captcha(
         drawings=[
             image.background(),
             image.text(fonts=self._fonts, drawings=text_drawings),
             image.curve(),
             image.noise(),
             image.smooth(),
         ],
         width=self._width,
         height=self._height,
     )
     return fn(chars)
예제 #2
0
 def generate_image(self, chars):
     text_drawings = [
         image.warp(),
         image.rotate(),
         image.offset(),
     ]
     fn = image.captcha(
         drawings=[
             image.background(),
             image.text(fonts=self._fonts, drawings=text_drawings),
             image.curve(),
             image.noise(),
             image.smooth(),
         ],
         width=self._width,
         height=self._height,
     )
     return fn(chars)
예제 #3
0
 def generate_image(self, chars):
     text_drawings = [
         image.warp(),
         image.rotate(),
         image.offset(),
     ]
     fn = image.captcha(
         drawings=[
             image.background(color='#FFFFFF'),
             image.text(fonts=self._fonts, drawings=text_drawings),
             image.curve(width=2),
             image.curve(width=2),
             image.curve(width=2),
             image.noise(number=60, color='#5C87B2', level=2),
             image.smooth(),
         ],
         width=self._width,
         height=self._height,
     )
     return fn(chars)