Skip to content

Commit 451dbb4

Browse files
committed
Remove quant_frames entirely (Thanks @Jsfasdf250)
1 parent ad69e97 commit 451dbb4

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

src/core/animation_exporter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ class AnimationExporter:
3434
Saves the animation as an APNG file.
3535
"""
3636

37-
def __init__(self, output_dir, current_version, scale_image_func, quant_frames=None):
37+
def __init__(self, output_dir, current_version, scale_image_func):
3838
self.output_dir = output_dir
3939
self.current_version = current_version
4040
self.scale_image = scale_image_func
41-
self.quant_frames = quant_frames or {}
4241

4342
def save_animations(self, image_tuples, spritesheet_name, animation_name, settings):
4443
anims_generated = 0

src/core/animation_processor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class AnimationProcessor:
1717
output_dir (str): The directory where the output frames and animations will be saved.
1818
settings_manager (SettingsManager): Manages global, animation-specific, and spritesheet-specific settings.
1919
current_version (str): The current version of the application.
20-
quant_frames (dict): A dictionary to store quantized frames for optimized GIF generation.
2120
2221
Methods:
2322
process_animations(is_unknown_spritesheet=False):
@@ -33,12 +32,11 @@ def __init__(self, animations, atlas_path, output_dir, settings_manager, current
3332
self.output_dir = output_dir
3433
self.settings_manager = settings_manager
3534
self.current_version = current_version
36-
self.quant_frames = {}
3735
self.frame_exporter = FrameExporter(
3836
self.output_dir, self.current_version, self.scale_image
3937
)
4038
self.animation_exporter = AnimationExporter(
41-
self.output_dir, self.current_version, self.scale_image, self.quant_frames
39+
self.output_dir, self.current_version, self.scale_image
4240
)
4341

4442
def process_animations(self, is_unknown_spritesheet=False):

src/core/extractor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,12 @@ def generate_temp_animation_for_preview(self, atlas_path, metadata_path, setting
197197
if temp_dir is None:
198198
temp_dir = tempfile.mkdtemp()
199199

200-
quant_frames = {}
201200
animation_exporter = AnimationExporter(
202201
temp_dir,
203202
self.current_version,
204203
lambda img, size: img.resize(
205204
(round(img.width * abs(size)), round(img.height * abs(size))), Image.NEAREST
206205
),
207-
quant_frames,
208206
)
209207

210208
for anim_name, image_tuples in animations.items():

0 commit comments

Comments
 (0)