|
19 | 19 | "\n",
|
20 | 20 | "sb_logo = sb_logo.set_position((320 - logo_size_x/2, 0))\n",
|
21 | 21 | "\n",
|
22 |
| - " \n", |
| 22 | + "\n", |
23 | 23 | "# Texto creado con Gizeh y convertido en instancia de Moviepy\n",
|
24 | 24 | "surface = gz.Surface(width=500, height=70, bg_color=(1, 1, 1))\n",
|
25 |
| - "text_clip = gz.text(\"Let's Build Together!\", \n", |
26 |
| - " fontfamily=\"Arial\", fontsize=35, \n", |
| 25 | + "text_clip = gz.text(\"Let's Build Together!\",\n", |
| 26 | + " fontfamily=\"Arial\", fontsize=35,\n", |
27 | 27 | " xy=(250, 35), fill=(59/255, 89/255, 152/255))\n",
|
28 | 28 | "text_clip.draw(surface)\n",
|
29 | 29 | "text_instance = mpy.ImageClip(surface.get_npimage())\n",
|
|
36 | 36 | "\n",
|
37 | 37 | "\n",
|
38 | 38 | "# Fade in text\n",
|
39 |
| - "text_instance = vfx.fadein(text_instance.set_start(1.5), 1, initial_color=(255, 255, 255))\n", |
| 39 | + "text_instance = vfx.fadein(text_instance.set_start(\n", |
| 40 | + " 1.5), 1, initial_color=(255, 255, 255))\n", |
40 | 41 | "\n",
|
41 | 42 | "\n",
|
42 | 43 | "# Linea dibujada con Gizeh\n",
|
43 | 44 | "linea_pos_y = logo_size_y + text_size_y\n",
|
44 | 45 | "\n",
|
45 | 46 | "surface_linea = gz.Surface(width=640, height=25, bg_color=(1, 1, 1))\n",
|
46 |
| - "linea_azul = gz.polyline(points=[(-320, 50), (320, 50)], stroke_width=80, \n", |
47 |
| - " stroke=(59/255, 89/255, 152/255),\n", |
48 |
| - " xy=(320, 0))\n", |
| 47 | + "linea_azul = gz.polyline(\n", |
| 48 | + " points=[(-320, 50), (320, 50)], stroke_width=80,\n", |
| 49 | + " stroke=(59/255, 89/255, 152/255),\n", |
| 50 | + " xy=(320, 0))\n", |
49 | 51 | "linea_azul.draw(surface_linea)\n",
|
50 |
| - "linea_instancia = mpy.ImageClip(surface_linea.get_npimage()).set_position((0, logo_size_y + text_size_y))\n", |
| 52 | + "linea_instancia = mpy.ImageClip(surface_linea.get_npimage()).set_position(\n", |
| 53 | + " (0, logo_size_y + text_size_y))\n", |
51 | 54 | "\n",
|
52 | 55 | "linea_instancia = vfx.fadein(linea_instancia, 1, initial_color=(255, 255, 255))\n",
|
53 | 56 | "\n",
|
54 | 57 | "\n",
|
55 | 58 | "# Stack Builders logo + text + linea azul\n",
|
56 |
| - "logo_text = mpy.CompositeVideoClip([sb_logo, text_instance, linea_instancia], size=(640, 640)).set_duration(3).set_fps(20).on_color(color=(255, 255, 255))\n", |
| 59 | + "logo_text = mpy.CompositeVideoClip(\n", |
| 60 | + " [sb_logo, text_instance, linea_instancia],\n", |
| 61 | + " size=(640, 640)).\\\n", |
| 62 | + " set_duration(3).\\\n", |
| 63 | + " set_fps(20).\\\n", |
| 64 | + " on_color(color=(255, 255, 255))\n", |
57 | 65 | "logo_text.ipython_display()"
|
58 | 66 | ]
|
59 | 67 | },
|
|
81 | 89 | "name": "python",
|
82 | 90 | "nbconvert_exporter": "python",
|
83 | 91 | "pygments_lexer": "ipython3",
|
84 |
| - "version": "3.6.5" |
| 92 | + "version": "3.7.0" |
85 | 93 | }
|
86 | 94 | },
|
87 | 95 | "nbformat": 4,
|
|
0 commit comments