initial commit and version 1.0

This commit is contained in:
2025-04-21 15:14:03 +02:00
commit ae6b2bbf44
82 changed files with 10782 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from dataclasses import dataclass
from moviepy.Clip import Clip
from moviepy.Effect import Effect
@dataclass
class GammaCorrection(Effect):
"""Gamma-correction of a video clip."""
gamma: float
def apply(self, clip: Clip) -> Clip:
"""Apply the effect to the clip."""
def filter(im):
corrected = 255 * (1.0 * im / 255) ** self.gamma
return corrected.astype("uint8")
return clip.image_transform(filter)