From 6983d74f3476e05b8f1f08c212aa1b9b4e3d8b4b Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Wed, 11 Feb 2026 16:43:17 +0000 Subject: [PATCH] fix: actually apply canvas sizing during TGA conversion The _apply_canvas method existed but was never called in convert_tga_to_png. Now properly applies canvas sizing in both PIL and manual conversion paths. --- modules/tga_converter.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/tga_converter.py b/modules/tga_converter.py index 82e59bc..def71f6 100644 --- a/modules/tga_converter.py +++ b/modules/tga_converter.py @@ -296,6 +296,10 @@ class TGAConverter: else: image = image.convert('RGBA') + # Apply canvas sizing if requested + if canvas_size: + image = self._apply_canvas(image, canvas_size, upscale) + # Determine output path and format if output_name is None: output_name = tga_path.stem @@ -327,6 +331,10 @@ class TGAConverter: else: image = Image.fromarray(pixels, 'RGB') + # Apply canvas sizing if requested + if canvas_size: + image = self._apply_canvas(image, canvas_size, upscale) + # Determine output path and format if output_name is None: output_name = tga_path.stem