mirror of
https://github.com/gen2brain/cbconvert
synced 2026-06-30 09:11:54 +02:00
Add NoUpscale option
This commit is contained in:
@@ -25,6 +25,7 @@ func options() cbconvert.Options {
|
||||
opts.Height = iup.GetHandle("Height").GetInt("VALUE")
|
||||
opts.DPI = dpiValue(iup.GetHandle("DPI").GetAttribute("VALUE"))
|
||||
opts.Fit = iup.GetHandle("Fit").GetAttribute("VALUE") == "ON"
|
||||
opts.NoUpscale = iup.GetHandle("NoUpscale").GetAttribute("VALUE") == "ON"
|
||||
opts.Filter = iup.GetHandle("Filter").GetInt("VALUE") - 1
|
||||
opts.Quality = iup.GetHandle("Quality").GetInt("VALUE")
|
||||
switch opts.Format {
|
||||
|
||||
@@ -39,6 +39,7 @@ var settings = []setting{
|
||||
{"NoNonImage", kindBool, "OFF"},
|
||||
{"Combine", kindBool, "OFF"},
|
||||
{"Fit", kindBool, "OFF"},
|
||||
{"NoUpscale", kindBool, "OFF"},
|
||||
{"Lossless", kindBool, "OFF"},
|
||||
{"Grayscale", kindBool, "OFF"},
|
||||
{"OutDir", kindStr, ""},
|
||||
|
||||
@@ -359,6 +359,8 @@ func tabImage() iup.Ihandle {
|
||||
iup.Vbox(
|
||||
iup.Toggle(" Best Fit").SetHandle("Fit").
|
||||
SetAttributes(`TIP="Best fit for required width and height"`),
|
||||
iup.Toggle(" No Upscale").SetHandle("NoUpscale").
|
||||
SetAttribute("TIP", "Do not enlarge images already smaller than the requested size"),
|
||||
),
|
||||
iup.Vbox(
|
||||
iup.Label("Resize Filter:"),
|
||||
|
||||
Reference in New Issue
Block a user