def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="LinkedIn connections",
        rtl=False,
        xy=(10, 350),
        size=70,
    )

    add_text(
        draw=draw,
        text="קשרים בלינקדין",
        rtl=True,
        xy=(900, 500),
        size=70,
    )

    #    add_text(
    #        draw = draw,
    #        text = "איך משתמשים בסלאק?",
    #        rtl  = True,
    #        xy   = (1200, 130),
    #        size = 60,
    #    )

    isize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='python.png', box=(10, 10), mask=True)
    embed_image(img=img,
                filename='LinkedIn-In.png',
                size=(300, 300),
                box=(10, 10),
                mask=True)
    embed_image(img=img,
                filename='danit-raanan.jpeg',
                box=(10, height - isize - 10))

    img.save(png_filepath)
    img.show()
예제 #2
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="Hacktoberfest",
        rtl=False,
        xy=(400, 80),
        size=70,
    )

    add_text(
        draw=draw,
        text="הקטוברפסט",
        rtl=True,
        xy=(800, 350),
        size=70,
    )

    #    add_text(
    #        draw = draw,
    #        text = "איך משתמשים בסלאק?",
    #        rtl  = True,
    #        xy   = (1200, 130),
    #        size = 60,
    #    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='digital-ocean-icon-blue.png',
                box=(30, 500),
                mask=True)
    embed_image(img=img,
                filename='github-octocat.png',
                size=(300, 300),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
예제 #3
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="How to use Slack?",
        rtl=False,
        xy=(10, 250),
        size=60,
    )

    #    add_text(
    #        draw = draw,
    #        text = "שידור חי ניסיוני",
    #        rtl  = True,
    #        xy   = (1200, 30),
    #        size = 40,
    #    )

    add_text(
        draw=draw,
        text="איך משתמשים בסלאק?",
        rtl=True,
        xy=(1200, 130),
        size=60,
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='python.png', box=(10, 10), mask=True)
    embed_image(img=img,
                filename='Slack_RGB.png',
                size=(300, 300),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="דקורטורים בפייתון",
        rtl=True,
        xy=(1000, 100),
        size=70,
    )

    add_text(
        draw=draw,
        text="Decorators in Python",
        rtl=False,
        xy=(100, 470),
        size=70,
    )

    #    add_text(
    #        draw = draw,
    #        text = "תכנות בפייתון עם מונגו",
    #        rtl  = True,
    #        xy   = (850, 350),
    #        size = 70,
    #    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='python.png',
                size=(300, 300),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "App PerlTidy Tk",
        rtl  = False,
        size = 80,
        xy   = (50, 40),
    )

#    add_text(
#        draw = draw,
#        text = "in our own script",
#        rtl  = False,
#        size = 80,
#        xy   = (50, 240),
#    )

    add_text(
        draw = draw,
        text = "Introducing version 0.01",
        rtl  = False,
        size = 80,
        xy   = (50, 200),
    )

    add_text(
        draw = draw,
        text = "GUI for Perl Tidy",
        rtl  = False,
        size = 80,
        xy   = (50, 360),
    )

    add_text(
        draw = draw,
        text = "Perl Maven",
        rtl  = False,
        size = 80,
        xy   = (50, 520),
    )


    isize = 350
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    #embed_image(img=img, filename='tessa.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
예제 #6
0
def create_thumbnail(episode, show=False):
    png_filename = os.path.splitext(
        os.path.basename(__file__))[0] + f'_{episode:02n}.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', 'python-functional',
                                png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Functional Programming",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text=f"with Python  -  Part {episode}",
        rtl=False,
        size=80,
        xy=(250, 140),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='github-octocat.png', size=(isize, isize), box=(10, 400), mask=True)
    embed_image(img=img,
                filename='python.png',
                size=(isize, isize),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    if show:
        img.show()
예제 #7
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Learning Crystal",
        rtl=False,
        size=80,
        xy=(330, 30),
    )

    add_text(
        draw=draw,
        text="Programming - part 2",
        rtl=False,
        size=80,
        xy=(330, 200),
    )

    add_text(
        draw=draw,
        text="puts, print, p!, variable interpolation",
        rtl=False,
        size=60,
        xy=(30, 400),
    )

    add_text(
        draw=draw,
        text="    Gábor Szabó",
        rtl=False,
        size=60,
        xy=(620, 620),
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='crystal_b.png',
                size=(200, 200),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw = draw,
        text = "RT.CPAN.ORG is closing",
        rtl  = False,
        size = 80,
        xy   = (150, 170),
    )

    add_text(
        draw = draw,
        text = "Update your",
        rtl  = False,
        size = 80,
        xy   = (230, 320),
    )

    add_text(
        draw = draw,
        text = "META",
        rtl  = False,
        size = 80,
        xy   = (230, 450),
    )


    add_text(
        draw = draw,
        text = "data",
        rtl  = False,
        size = 80,
        xy   = (230, 580),
    )


    isize = 350
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='cpan.png', box=(10, 10), mask=False)
    embed_image(img=img, filename='metacpan.jpg', box=(10, 410), mask=False)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="Perl development",
        rtl=False,
        size=80,
        xy=(200, 30),
    )

    add_text(
        draw=draw,
        text="CPAN Digger",
        rtl=False,
        size=80,
        xy=(50, 220),
    )

    add_text(
        draw=draw,
        text="CPAN Dashboard",
        rtl=False,
        size=80,
        xy=(50, 410),
    )

    add_text(
        draw=draw,
        text="CPAN Rocks",
        rtl=False,
        size=80,
        xy=(50, 600),
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='metacpan.jpg', box=(10, 10), mask=False)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="Legyen neked is jó",
        rtl=False,
        xy=(30, 350),
        size=90,
    )

    add_text(
        draw=draw,
        text="LinkedIn címed!",
        rtl=False,
        xy=(30, 550),
        size=90,
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='python.png', box=(10, 10), mask=True)
    embed_image(img=img,
                filename='LinkedIn-In.png',
                size=(300, 300),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
예제 #11
0
파일: d-b.py 프로젝트: szabgab/workshops
def create_thumbnail():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    png_filepath = os.path.join(root, 'images', png_filename)

    img = Image.new('RGB', (width, height), color=background_color)

    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "d-b",
        rtl  = False,
#        size = 450,
#        xy   = (8, 150),
        size = 50,
        xy   = (70, 8),
    )

    img.save(png_filepath)
    img.show()
예제 #12
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Laravel in Docker",
        rtl  = False,
        size = 80,
        xy   = (330, 30),
    )

    add_text(
        draw = draw,
        text = "Live programming session",
        rtl  = False,
        size = 60,
        xy   = (330, 200),
    )

    add_text(
        draw = draw,
        text = "Natalie O'Brien",
        rtl  = False,
        size = 60,
        xy   = (220, 520),
    )

    add_text(
        draw = draw,
        text = "    Gábor Szabó",
        rtl  = False,
        size = 60,
        xy   = (620, 620),
    )

    embed_image(img=img, filename='natalie_obrien.jpeg',   size=(200, 200), box=(10, 500))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(200, 200), box=(width-200-10, 500))
    #embed_image(img=img, filename='laravel.png', size=(200, 200), box=(10, 10), mask=False)

    img.save(png_filepath)
    img.show()
예제 #13
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Getting Started",
        rtl  = False,
        size = 80,
        xy   = (250, 30),
    )

    add_text(
        draw = draw,
        text = "with the Golang",
        rtl  = False,
        size = 80,
        xy   = (250, 240),
    )

    add_text(
        draw = draw,
        text = "Course",
        rtl  = False,
        size = 80,
        xy   = (250, 440),
    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)


    isize = 350
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='golang.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Getting started with Git",
        rtl=False,
        size=80,
        xy=(300, 30),
    )

    add_text(
        draw=draw,
        text="and GitHub",
        rtl=False,
        size=80,
        xy=(300, 200),
    )

    add_text(
        draw=draw,
        text="Olga Tapinova      Gábor Szabó",
        rtl=False,
        size=80,
        xy=(30, 420),
    )

    embed_image(img=img,
                filename='olga_tapinova.jpg',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='github-octocat.png',
                size=(200, 200),
                box=(10, 210),
                mask=True)
    embed_image(img=img,
                filename='git-logo-512x214.png',
                size=(200, 200),
                box=(10, 30),
                mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Docker, Docker Compose",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="GitHub Actions",
        rtl=False,
        size=80,
        xy=(250, 200),
    )

    add_text(
        draw=draw,
        text="Thomas Klausner    Gábor Szabó",
        rtl=False,
        size=80,
        xy=(10, 420),
    )

    embed_image(img=img,
                filename='thomas-klausner.png',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='docker-moby-logo.png',
                size=(200, 200),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
예제 #16
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Crear una página de",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="GitHub",
        rtl=False,
        size=80,
        xy=(250, 200),
    )

    add_text(
        draw=draw,
        text="Laia Asensio López                Gábor Szabó",
        rtl=False,
        size=60,
        xy=(30, 420),
    )

    embed_image(img=img, filename='laia.jpeg', size=(200, 200), box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='github-octocat.png',
                size=(200, 200),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
예제 #17
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Command line accounting",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="project using Python",
        rtl=False,
        size=80,
        xy=(250, 200),
    )

    add_text(
        draw=draw,
        text="Olga Tapinova      Gábor Szabó",
        rtl=False,
        size=80,
        xy=(30, 420),
    )

    embed_image(img=img,
                filename='olga_tapinova.jpg',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img, filename='python.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
예제 #18
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Hello World",
        rtl=False,
        size=80,
        xy=(450, 30),
    )

    add_text(
        draw=draw,
        text="using Mojolicious",
        rtl=False,
        size=80,
        xy=(450, 240),
    )

    add_text(
        draw=draw,
        text="in Docker",
        rtl=False,
        size=80,
        xy=(450, 440),
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='mojolicious.png', box=(10, 10), mask=True)
    embed_image(img=img, filename='docker.png', box=(10, 400), mask=True)

    img.save(png_filepath)
    img.show()
예제 #19
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Live web development",
        rtl  = False,
        size = 80,
        xy   = (350, 30),
    )

    add_text(
        draw = draw,
        text = "part 7",
        rtl  = False,
        size = 80,
        xy   = (350, 200),
    )


    add_text(
        draw = draw,
        text = "Mark Gardner          Gábor Szabó",
        rtl  = False,
        size = 80,
        xy   = (10, 420),
    )

    embed_image(img=img, filename='mark_gardner.png',   size=(200, 200), box=(10, 500))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(200, 200), box=(width-200-10, 500))
    embed_image(img=img, filename='mojolicious.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
예제 #20
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    png_filepath = os.path.join(root, 'images', png_filename)

    img = Image.new('RGB', (width, height), color=background_color)

    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 80)
    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text='Code       Maven',
        rtl=False,
        xy=('center', 30),
        size=60,
    )
    add_text(
        draw=draw,
        #text = 'screencasts, blog posts, code-snippets',
        text='Helping developers create better software',
        rtl=False,
        xy=('center', 120),
        size=40,
    )

    add_text(
        draw=draw,
        text='Test Automation - Continuous Integration - DevOps',
        rtl=False,
        xy=('center', 200),
        size=40,
    )

    isize = 150
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(70, 70),
                box=(745, 23),
                mask=True)
    embed_image(img=img,
                filename='perl.png',
                size=(isize, isize),
                box=(30, 30),
                mask=True)
    embed_image(img=img,
                filename='tessa.png',
                size=(isize, isize),
                box=(width - isize - 30, 30),
                mask=True)
    #embed_image(img=img, filename='golang.png', size=(isize, isize), box=(width-isize-30, 30), mask=True)
    embed_image(img=img,
                filename='tux.png',
                size=(isize, isize),
                box=(width - isize - 30, height - isize - 30),
                mask=True)
    embed_image(img=img,
                filename='docker-moby-logo.png',
                size=(isize, isize),
                box=(30, height - isize - 30),
                mask=True)

    img.save(png_filepath)
    img.show()
예제 #21
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Last chance in 2020 to set up CI/CD",
        rtl=False,
        size=70,
        xy=(50, 30),
    )

    add_text(
        draw=draw,
        text="Jenkins",
        rtl=False,
        size=70,
        xy=(250, 170),
    )

    add_text(
        draw=draw,
        text="GitHub Actions",
        rtl=False,
        size=70,
        xy=(250, 320),
    )

    add_text(
        draw=draw,
        text="GitLab Pipelines",
        rtl=False,
        size=70,
        xy=(250, 420),
    )

    add_text(
        draw=draw,
        text="Travis-CI",
        rtl=False,
        size=70,
        xy=(250, 580),
    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='jenkins_256.png', box=(10, 100), mask=True)
    embed_image(img=img,
                filename='tessa.png',
                box=(10, height - 260),
                mask=True)

    img.save(png_filepath)
    img.show()
예제 #22
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    draw.text(
        text="Code-Maven      -   LinkedIn",
        xy=(250, 30),
        fill=(0, 0, 0),
        font=font_title,
    )

    add_text(
        draw = draw,
        text = "מציאת עבודה )חדשה( בהיי-טק",
        rtl  = True,
        xy   = (1100, 130),
        size = 60,
    )

    add_text(
        draw = draw,
        text = "שיחה עם דנית רענן אידסס",
        rtl  = True,
        xy   = (1100, 230),
        size = 60,
    )

    add_text(
        draw = draw,
        text = "מגייסת ואשת כח אדם",
        rtl  = True,
        xy   = (1100, 330),
        size = 60,
    )

    add_date(
        date_right = 730,
        date_top   = images_top,
        font       = font,
        draw       = draw,
        date       = "03.06.2020",
        day        = heb("יום ד"),
        hours      = "09:00-10:00",
    )


    add_text(
        draw = draw,
        text = "מארח",
        rtl  = True,
        xy   = (width - isize - 20, images_top),
        size = 30,
    )

    add_text(
        draw = draw,
        text = "גאבור סבו",
        rtl  = True,
        xy   = (width - isize - 20, images_top + 50),
        size = 30,
    )

    add_text(
        draw = draw,
        text = "אורחת",
        rtl  = True,
        xy   = (445, images_top),
        size = 30,
    )

    add_text(
        draw = draw,
        text = "דנית רענן אידסס",
        rtl  =  True,
        xy   = (445, images_top + 50),
        size = 30,
    )

    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='LinkedIn-In.png', size=(isize, isize), box=(10, 20), mask=True)
    embed_image(img=img, filename='danit-raanan.jpeg', size=(isize, isize), box=(10, height-isize-10))

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Web application testing",
        rtl  = False,
        size = 70,
        xy   = (240, 30),
    )

    add_text(
        draw = draw,
        text = "with",
        rtl  = False,
        size = 70,
        xy   = (540, 180),
    )


    add_text(
        draw = draw,
        text = "Selenium and Python",
        rtl  = False,
        size = 80,
        xy   = (240, 330),
    )
#
#    add_text(
#        draw = draw,
#        text = "and Gábor Szabó",
#        rtl  = False,
#        size = 80,
#        xy   = (50, 540),
#    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)


    embed_image(img=img, filename='selenium-green.png', size=(200, 208), box=(10, 10))
    embed_image(img=img, filename='python.png',         size=(200, 200), box=(width-200-10, 10), mask=True)
    embed_image(img=img, filename='ynon_perek.jpeg',    size=(200, 200), box=(10, 500))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(200, 200), box=(width-200-10, 500))

    img.save(png_filepath)
    img.show()
예제 #24
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="MetaCPAN recent",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="Perl Weekly Stats",
        rtl=False,
        size=80,
        xy=(250, 220),
    )

    add_text(
        draw=draw,
        text="Link to VCS",
        rtl=False,
        size=80,
        xy=(250, 400),
    )

    add_text(
        draw=draw,
        text="CI enabled",
        rtl=False,
        size=80,
        xy=(250, 580),
    )

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='metacpan.jpg', box=(10, 10), mask=False)

    img.save(png_filepath)
    img.show()
예제 #25
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Continuous Integration (CI)",
        rtl=False,
        size=80,
        xy=(150, 30),
    )

    add_text(
        draw=draw,
        text="with GitHub Actions",
        rtl=False,
        size=80,
        xy=(150, 140),
    )

    add_text(
        draw=draw,
        text="in Hebrew",
        rtl=False,
        size=80,
        xy=(150, 280),
    )

    add_text(
        draw=draw,
        text="בעברית",
        rtl=True,
        size=80,
        xy=(950, 280),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='github-octocat.png',
                size=(isize, isize),
                box=(10, 400),
                mask=True)
    embed_image(img=img,
                filename='israel-flag-small.png',
                size=(fsize, fsize),
                box=(width - fsize - 10, height - isize - fsize + 30),
                mask=False)

    img.save(png_filepath)
    img.show()
def create_thumbnail(episode, show=False):
    png_filename = os.path.splitext(
        os.path.basename(__file__))[0] + f'_{episode:02n}.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Jupyter Notebook",
        rtl=False,
        size=80,
        xy=(300, 30),
    )

    add_text(
        draw=draw,
        text=f"יופיטר נוטבוק",
        rtl=True,
        size=80,
        xy=(1000, 240),
    )

    #    add_text(
    #        draw = draw,
    #        text = "OOP in Python",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (50, 450),
    #    )

    #    add_text(
    #        draw = draw,
    #        text = f"Part {episode}",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (50, 560),
    #    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        size=80,
        xy=(850, 560),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='github-octocat.png', size=(isize, isize), box=(10, 400), mask=True)
    embed_image(img=img,
                filename='python.png',
                size=(isize, isize),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    if show:
        img.show()
예제 #27
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf',
                                       40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="עבודה בקוואלקום, ישראל?",
        rtl=True,
        xy=(990, 30),
        size=60,
    )

    add_text(
        draw=draw,
        text="שיחה עם עומר מרגלית",
        rtl=True,
        xy=(990, 160),
        size=60,
    )

    add_text(
        draw=draw,
        text="מגייסת בכירה ומרכזת תחום הגיוס",
        rtl=True,
        xy=(990, 290),
        size=60,
    )

    add_date(
        date_right=730,
        date_top=images_top,
        font=font,
        draw=draw,
        date="03.09.2020",
        day=heb("יום ה"),
        hours="09:00-10:00",
    )

    add_text(
        draw=draw,
        text="מארח",
        rtl=True,
        xy=(width - isize - 20, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        xy=(width - isize - 20, images_top + 50),
        size=30,
    )

    add_text(
        draw=draw,
        text="אורחת",
        rtl=True,
        xy=(395, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="עומר מרגלית",
        rtl=True,
        xy=(395, images_top + 50),
        size=30,
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(isize, isize),
                box=(width - isize - 10, 20),
                mask=True)
    embed_image(img=img,
                filename='qualcomm_q.png',
                size=(isize, isize),
                box=(10, 20),
                mask=False)
    embed_image(img=img,
                filename='omer-margalit.jpeg',
                size=(isize, isize),
                box=(10, height - isize - 10))

    img.save(png_filepath)
    img.show()
예제 #28
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    draw.text(
        text="Code-Maven      -   LinkedIn",
        xy=(250, 30),
        fill=(0, 0, 0),
        font=font_title,
    )

    add_text(
        draw = draw,
        text = "איך להשתמש בלינקדין",
        rtl  = True,
        xy   = (1100, 130),
        size = 60,
    )

    add_text(
        draw = draw,
        text = "כדי למצוא עבודה בהי-טק",
        rtl  = True,
        xy   = (1100, 230),
        size = 60,
    )

    add_text(
        draw = draw,
        text = "סדנת און-ליין חינם",
        rtl = True,
        xy   = (1100, 330),
        size = 60,
    )



    add_date(
        date_right = 250,
        date_top   = 460,
        font       = font,
        draw       = draw,
        date       = "24.05.2020",
        day        = heb("יום א"),
        hours      = "17:30-18:30",
    )

    hebrew = "מרצה:"
    draw.text(
        text=hebrew[::-1],
        xy=(790, 500),
        fill=(0, 0, 0),
        font=font_gabor,
    )

    hebrew = "גאבור סבו"
    draw.text(
        text=hebrew[::-1],
        xy=(700, 550),
        fill=(0, 0, 0),
        font=font_gabor,
    )

    isize = 250
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='LinkedIn-In.png', size=(isize, isize), box=(10, 20), mask=True)

    img.save(png_filepath)
    img.show()
예제 #29
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf',
                                       40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    #draw.text(
    #    text="Storemaven - Code-Maven",
    #    xy=(230, 30),
    #    fill=(0, 0, 0),
    #    font=font_title,
    #)

    add_text(
        draw=draw,
        text="תכנות פייתון ביופיטר נוטבוק",
        rtl=True,
        xy=(820, 30),
        size=60,
    )

    add_text(
        draw=draw,
        text="Python with Jupyter Notebook",
        rtl=False,
        xy=(40, 160),
        size=60,
    )

    #add_text(
    #    draw = draw,
    #    text = "in Docker",
    #    rtl  = False,
    #    xy   = (270, 290),
    #    size = 60,
    #)

    add_text(
        draw=draw,
        text="(in Hebrew)",
        rtl=False,
        xy=(220, 290),
        size=40,
    )

    add_date(
        date_right=630,
        date_top=images_top,
        font=font,
        draw=draw,
        date="28.04.2021",
        day=heb("יום ד"),
        hours="09:00-11:00",
    )

    add_text(
        draw=draw,
        text="מרצה",
        rtl=True,
        xy=(width - isize - 20, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        xy=(width - isize - 20, images_top + 50),
        size=30,
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(isize, isize),
                box=(width - isize - 10, 20),
                mask=True)
    embed_image(img=img,
                filename='python.png',
                size=(isize, isize),
                box=(10, height - isize - 10),
                mask=True)
    #embed_image(img=img, filename='gitlab.jpg', size=(isize, isize), box=(10, 20), mask=False)
    #embed_image(img=img, filename='docker.png', size=(isize, isize), box=(10, height-isize-10), mask=True)

    img.save(png_filepath)
    img.show()
예제 #30
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf',
                                       40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    #draw.text(
    #    text="Storemaven - Code-Maven",
    #    xy=(230, 30),
    #    fill=(0, 0, 0),
    #    font=font_title,
    #)

    add_text(
        draw=draw,
        text="היי-טק בלי משרדים",
        rtl=True,
        xy=(950, 30),
        size=60,
    )

    add_text(
        draw=draw,
        text="שיחה עם אורית גולובינסקי",
        rtl=True,
        xy=(950, 160),
        size=60,
    )

    add_text(
        draw=draw,
        text="מנהלת מוצר בכירה בגיטלאב",
        rtl=True,
        xy=(950, 290),
        size=60,
    )

    #add_text(
    #    draw = draw,
    #    text = "C-Level",
    #    rtl  = False,
    #    xy   = (110, 290),
    #    size = 60,
    #)

    add_date(
        date_right=730,
        date_top=images_top,
        font=font,
        draw=draw,
        date="08.07.2020",
        day=heb("יום ד"),
        hours="09:00-10:00",
    )

    add_text(
        draw=draw,
        text="מארח",
        rtl=True,
        xy=(width - isize - 20, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        xy=(width - isize - 20, images_top + 50),
        size=30,
    )

    add_text(
        draw=draw,
        text="אורחת",
        rtl=True,
        xy=(450, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="אורית גולובינסקי",
        rtl=True,
        xy=(450, images_top + 50),
        size=30,
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(isize, isize),
                box=(width - isize - 10, 20),
                mask=True)
    embed_image(img=img,
                filename='gitlab.jpg',
                size=(isize, isize),
                box=(10, 20),
                mask=False)
    embed_image(img=img,
                filename='orit-golowinski.jpeg',
                size=(isize, isize),
                box=(10, height - isize - 10))

    img.save(png_filepath)
    img.show()