diff --git a/iz_helpers/image.py b/iz_helpers/image.py index 3a84abe..aa14874 100644 --- a/iz_helpers/image.py +++ b/iz_helpers/image.py @@ -672,5 +672,5 @@ def PSLumaWipe_images(start_image: Image, stop_image: Image, luma_wipe_image: Im transition.putpixel((x, y), pixel) lw_frames.append(transition) print(f"Luma Wipe frame:{len(lw_frames)}") - lw_frames[-1].show() + #lw_frames[-1].show() return lw_frames \ No newline at end of file diff --git a/iz_helpers/video.py b/iz_helpers/video.py index c954334..2cc0a1e 100644 --- a/iz_helpers/video.py +++ b/iz_helpers/video.py @@ -1,6 +1,6 @@ import numpy as np import imageio -from .image import blend_images, draw_gradient_ellipse, alpha_composite_images +from .image import blend_images, draw_gradient_ellipse, alpha_composite_images, luma_wipe_images, PSLumaWipe_images import math def write_video(file_path, frames, fps, reversed=True, start_frame_dupe_amount=15, last_frame_dupe_amount=30, num_interpol_frames=2, blend=False, blend_image= None): @@ -29,11 +29,15 @@ def write_video(file_path, frames, fps, reversed=True, start_frame_dupe_amount=1 next_to_last_frame = frames[(-1 * num_frames_replaced)] print(f"Blending start: {math.ceil(start_frame_dupe_amount)} next frame:{(num_interpol_frames -1)}") - start_frames = alpha_composite_images(frames[0], next_frame, blend_image, math.ceil(start_frame_dupe_amount)) + #start_frames = alpha_composite_images(frames[0], next_frame, blend_image, math.ceil(start_frame_dupe_amount)) + #start_frames = luma_wipe_images(frames[0], next_frame, blend_image, math.ceil(start_frame_dupe_amount)) + start_frames = PSLumaWipe_images(frames[0], next_frame, blend_image, math.ceil(start_frame_dupe_amount),(200,200,0,128)) del frames[:num_frames_replaced] print(f"Blending end: {math.ceil(last_frame_dupe_amount)} next to last frame:{-1 * (num_interpol_frames + 1)}") - end_frames = alpha_composite_images(next_to_last_frame, frames[-1], blend_image, math.ceil(last_frame_dupe_amount)) + #end_frames = alpha_composite_images(next_to_last_frame, frames[-1], blend_image, math.ceil(last_frame_dupe_amount)) + #end_frames = luma_wipe_images(next_to_last_frame, frames[-1], blend_image, math.ceil(last_frame_dupe_amount)) + end_frames = PSLumaWipe_images(next_to_last_frame, frames[-1], blend_image, math.ceil(last_frame_dupe_amount,(200,200,0,128))) frames = frames[:(-1 * num_frames_replaced)] else: start_frames = [frames[0]] * start_frame_dupe_amount