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.
This commit is contained in:
parent
b666e40bfc
commit
6983d74f34
|
|
@ -296,6 +296,10 @@ class TGAConverter:
|
||||||
else:
|
else:
|
||||||
image = image.convert('RGBA')
|
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
|
# Determine output path and format
|
||||||
if output_name is None:
|
if output_name is None:
|
||||||
output_name = tga_path.stem
|
output_name = tga_path.stem
|
||||||
|
|
@ -327,6 +331,10 @@ class TGAConverter:
|
||||||
else:
|
else:
|
||||||
image = Image.fromarray(pixels, 'RGB')
|
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
|
# Determine output path and format
|
||||||
if output_name is None:
|
if output_name is None:
|
||||||
output_name = tga_path.stem
|
output_name = tga_path.stem
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue