(venv) daddy@DESKTOP-PQLPS4F:/mnt/c/Users/Jeff/logo$ python3 3d.py
Traceback (most recent call last):
  File "/mnt/c/Users/Jeff/logo/3d.py", line 93, in <module>
    create_3d_rotation_logo(image_path)
  File "/mnt/c/Users/Jeff/logo/3d.py", line 63, in create_3d_rotation_logo
    animated_logo = create_rotation_animation(logo_clip, duration=base_duration)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/Jeff/logo/3d.py", line 32, in create_rotation_animation
    scaled = ImageClip(make_frame=custom_make_frame, duration=duration)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^import numpy as np
from moviepy.editor import ImageClip, CompositeVideoClip
from moviepy.video.fx import all as vfx
from PIL import Image
import os

def create_rotation_animation(clip, duration=4):
    """Create a smooth rotation animation suitable for a landscape design logo."""
    
    w, h = clip.size
    
    # Create smooth 360-degree rotation for looping
    rotated = (clip
               .fx(vfx.rotate,
                   lambda t: 360 * t / duration,  # Complete 360° rotation
                   expand=True))

    # Instead of using resize fx, we'll implement our own scaling
    def custom_make_frame(t):
        frame = rotated.get_frame(t)
        scale = 1 + 0.08 * np.sin(2 * np.pi * t / duration)
        
        # Convert to PIL Image for high-quality resizing
        pil_img = Image.fromarray(frame)
        new_size = tuple(int(dim * scale) for dim in pil_img.size)
        resized = pil_img.resize(new_size, Image.Resampling.LANCZOS)
        
        # Convert back to numpy array
        return np.array(resized)
    
    # Create new clip with the custom frame maker
    scaled = ImageClip(make_frame=custom_make_frame, duration=duration)
    scaled = scaled.set_position('center')
    
    return scaled

def create_3d_rotation_logo(image_path, output_path=None):
    """Create a seamless looping 3D rotation animation."""
    # Set default output path
    if output_path is None:
        output_dir = os.path.dirname(image_path)
        output_path = os.path.join(output_dir, "rotating_platinum_logo.mp4")
    
    # Load and prepare the image
    logo = Image.open(image_path).convert("RGBA")
    
    # Calculate size to fit within 1024x1024 while maintaining aspect ratio
    max_size = 900  # Larger initial size for business logo
    ratio = min(max_size/logo.size[0], max_size/logo.size[1])
    new_size = tuple(int(dim * ratio) for dim in logo.size)
    logo = logo.resize(new_size, Image.Resampling.LANCZOS)
    
    # Convert to numpy array
    logo_array = np.array(logo)
    
    # Create base clip
    base_duration = 4  # Duration for one complete rotation
    logo_clip = (ImageClip(logo_array)
                .set_duration(base_duration)
                .set_position('center'))
    
    # Apply rotation animation
    animated_logo = create_rotation_animation(logo_clip, duration=base_duration)
    
    # Create the main clip with exact 1024x1024 dimensions
    main_clip = (CompositeVideoClip(
        [animated_logo],
        size=(1024, 1024),
        bg_color=None)  # None ensures transparency
        .set_duration(base_duration))
    
    # Write video with transparency support and loop
    main_clip.write_videofile(
        output_path,
        fps=30,
        codec='libx264',
        preset='medium',
        ffmpeg_params=[ 
            '-vf', 'format=yuva420p',
            '-colorspace', 'bt709',
            '-color_primaries', 'bt709',
            '-color_trc', 'bt709',
            '-pix_fmt', 'yuva420p',  # Ensure alpha channel support
            '-movflags', 'faststart',
            '-shortest',
            '-filter_complex', '[0:v]loop=999:32767:0[out]',  # Add looping
            '-map', '[out]'
        ]
    )

if __name__ == "__main__":
    image_path = "/mnt/c/Users/Jeff/logo/logo.png"
    create_3d_rotation_logo(image_path)

TypeError: ImageClip.__init__() got an unexpected keyword argument 'make_frame'