soiz commited on
Commit
4f05095
·
verified ·
1 Parent(s): 42e0d78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,15 +28,15 @@ def edit_file(file, loop_count, speed_factor, frame_skip):
28
  frames.append(frame.copy())
29
  durations.append(original_duration // speed_factor) # 再生速度調整
30
 
31
- # 保存(ループ回数を設定)
32
  output_path = f"{base_name}_edited.gif"
33
  frames[0].save(
34
  output_path,
35
  save_all=True,
36
  append_images=frames[1:],
37
- loop=loop_count if loop_count >= 0 else 0, # 無限ループは0
38
  duration=durations,
39
- disposal=2
40
  )
41
 
42
  return output_path, output_path
 
28
  frames.append(frame.copy())
29
  durations.append(original_duration // speed_factor) # 再生速度調整
30
 
31
+ # メタデータリセット&保存
32
  output_path = f"{base_name}_edited.gif"
33
  frames[0].save(
34
  output_path,
35
  save_all=True,
36
  append_images=frames[1:],
37
+ loop=loop_count, # ループ回数(0は無限ループ、1は1回ループ)
38
  duration=durations,
39
+ disposal=2 # 各フレームを上書きする設定
40
  )
41
 
42
  return output_path, output_path