feat: add "No Upscaling" option to TGA converter
- New option: "❌ No Upscaling" - keeps original icon size, just centers on canvas
- Useful when you want the icon at original resolution on a larger canvas
- Tooltip updated to explain all options
- When "none" is selected, upscale parameter becomes False
This commit is contained in:
parent
5374eba08f
commit
5ec7541e78
|
|
@ -312,7 +312,9 @@ class TGAConverter:
|
||||||
|
|
||||||
# Apply canvas sizing if requested
|
# Apply canvas sizing if requested
|
||||||
if canvas_size:
|
if canvas_size:
|
||||||
image = self._apply_canvas(image, canvas_size, upscale, upscale_method)
|
# upscale=True unless method is 'none'
|
||||||
|
do_upscale = upscale and upscale_method != 'none'
|
||||||
|
image = self._apply_canvas(image, canvas_size, do_upscale, upscale_method)
|
||||||
|
|
||||||
# Determine output path and format
|
# Determine output path and format
|
||||||
if output_name is None:
|
if output_name is None:
|
||||||
|
|
@ -347,7 +349,9 @@ class TGAConverter:
|
||||||
|
|
||||||
# Apply canvas sizing if requested
|
# Apply canvas sizing if requested
|
||||||
if canvas_size:
|
if canvas_size:
|
||||||
image = self._apply_canvas(image, canvas_size, upscale, upscale_method)
|
# upscale=True unless method is 'none'
|
||||||
|
do_upscale = upscale and upscale_method != 'none'
|
||||||
|
image = self._apply_canvas(image, canvas_size, do_upscale, upscale_method)
|
||||||
|
|
||||||
# Determine output path and format
|
# Determine output path and format
|
||||||
if output_name is None:
|
if output_name is None:
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,7 @@ class TGAConverterDialog(QDialog):
|
||||||
|
|
||||||
canvas_layout.addWidget(QLabel("Upscale:"))
|
canvas_layout.addWidget(QLabel("Upscale:"))
|
||||||
self.upscale_method_combo = QComboBox()
|
self.upscale_method_combo = QComboBox()
|
||||||
|
self.upscale_method_combo.addItem("❌ No Upscaling", "none")
|
||||||
self.upscale_method_combo.addItem("Sharp Pixels (NEAREST)", "nearest")
|
self.upscale_method_combo.addItem("Sharp Pixels (NEAREST)", "nearest")
|
||||||
self.upscale_method_combo.addItem("Smooth (HQ4x-style)", "hq4x")
|
self.upscale_method_combo.addItem("Smooth (HQ4x-style)", "hq4x")
|
||||||
self.upscale_method_combo.addItem("Photorealistic (LANCZOS)", "lanczos")
|
self.upscale_method_combo.addItem("Photorealistic (LANCZOS)", "lanczos")
|
||||||
|
|
@ -263,6 +264,7 @@ class TGAConverterDialog(QDialog):
|
||||||
self.upscale_method_combo.addItem("🤖 AI Enhanced (Real-ESRGAN)", "ai")
|
self.upscale_method_combo.addItem("🤖 AI Enhanced (Real-ESRGAN)", "ai")
|
||||||
|
|
||||||
self.upscale_method_combo.setToolTip(
|
self.upscale_method_combo.setToolTip(
|
||||||
|
"None: Keep original size, just center on canvas\n"
|
||||||
"NEAREST: Sharp pixel edges (best for pixel art)\n"
|
"NEAREST: Sharp pixel edges (best for pixel art)\n"
|
||||||
"HQ4x: Smooth but keeps details (best for game icons)\n"
|
"HQ4x: Smooth but keeps details (best for game icons)\n"
|
||||||
"LANCZOS: Very smooth (best for photos)\n"
|
"LANCZOS: Very smooth (best for photos)\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue