Skip to content

Commit

Permalink
Update pixelateTG.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arbadacarbaYK authored May 30, 2024
1 parent e9c1c61 commit 9f6f808
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pixelateTG.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ def clowns_overlay(photo_path, user_id, bot):

def process_gif(gif_path, session_id, user_id, bot):
frames = imageio.mimread(gif_path)
print(f"Number of frames in GIF: {len(frames)}")
processed_frames = [process_image(frame, user_id, session_id, bot) for frame in frames]
processed_gif_path = f"processed/{user_id}_{session_id}.gif"
imageio.mimsave(processed_gif_path, processed_frames)
print(f"Processed GIF saved at: {processed_gif_path}")
return processed_gif_path


def pixelate_faces(update: Update, context: CallbackContext) -> None:
session_id = str(uuid4())
user_data = context.user_data
Expand Down

0 comments on commit 9f6f808

Please sign in to comment.