Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| bash [Le 29/12/2025, 11:58] – [Création de scripts shell] 185.153.173.173 | bash [Le 29/12/2025, 13:28] (Version actuelle) – ancienne révision (Le 28/11/2025, 12:24) restaurée - voir recommandations krodelabestiole | ||
|---|---|---|---|
| Ligne 14: | Ligne 14: | ||
| ===== Utilisation avancée ===== | ===== Utilisation avancée ===== | ||
| - | from PIL import Image, ImageFilter, | + | ==== Création |
| - | import numpy as np | + | |
| - | import math | + | |
| - | from moviepy.editor import ImageSequenceClip | + | |
| - | + | ||
| - | # PARAMÈTRES | + | |
| - | SIZE = 1080 | + | |
| - | DURATION | + | |
| - | FPS = 30 | + | |
| - | FRAMES | + | |
| - | + | ||
| - | logo = Image.open(" | + | |
| - | logo = logo.resize((SIZE, | + | |
| - | + | ||
| - | frames = [] | + | |
| - | + | ||
| - | for i in range(FRAMES): | + | |
| - | t = i / FRAMES | + | |
| - | + | ||
| - | # Rotation (ne jamais atteindre 360°) | + | |
| - | angle = 360 * t | + | |
| - | + | ||
| - | # Fond noir | + | |
| - | frame = Image.new(" | + | |
| - | + | ||
| - | # Rotation du logo | + | |
| - | rotated = logo.rotate(angle, | + | |
| - | + | ||
| - | # Intensité parfaitement loopable (cosinus fermé) | + | |
| - | # 0.5 → 1 → 0.5 | + | |
| - | intensity = 0.5 + 0.5 * (1 - math.cos(2 * math.pi * t)) / 2 | + | |
| - | + | ||
| - | # Glow blanc froid | + | |
| - | glow = rotated.filter(ImageFilter.GaussianBlur(radius=28)) | + | |
| - | glow = ImageEnhance.Brightness(glow).enhance(2.6 * intensity) | + | |
| - | glow = ImageEnhance.Color(glow).enhance(1.4) | + | |
| - | + | ||
| - | # Fusion | + | |
| - | frame = Image.alpha_composite(frame, | + | |
| - | frame = Image.alpha_composite(frame, | + | |
| - | + | ||
| - | frames.append(np.array(frame.convert(" | + | |
| - | + | ||
| - | # Création | + | |
| - | clip = ImageSequenceClip(frames, | + | |
| - | clip.write_videofile( | + | |
| - | " | + | |
| - | codec=" | + | |
| - | bitrate=" | + | |
| - | audio=False | + | |
| - | ) | + | |
| - | + | ||
| - | print(" | + | |
| + | * Commencer par le [[: | ||
| + | * [[https:// | ||
| + | | ||
| ==== Séparateur de mot ==== | ==== Séparateur de mot ==== | ||
