waifu2x-mac icon indicating copy to clipboard operation
waifu2x-mac copied to clipboard

Input and output arguments for the CLI version

Open Toufukun opened this issue 4 years ago • 2 comments

Hi. Will you consider these possible improvements on the command-line arguments?

  • Remove the -i prefix for the input
  • Accept standard input and output (stdin & stdout)
  • Default output path (add a suffix -waifu2x.png, etc.)
  • Default values for scaling and denoise (-s 2 -n 1 for myself)
  • 1.6× scale in the original waifu2x

Toufukun avatar Sep 02 '20 15:09 Toufukun

Remove the -i prefix for the input

Adding -i makes it much easier to parse arguments. I don't think it is worth removing this considering that it doesn't affect usage at all.

Accept standard input and output (stdin & stdout)

This could be added.

Default output path (add a suffix -waifu2x.png, etc.) Default values for scaling and denoise (-s 2 -n 1 for myself)

Adding support for a config file could be considered.

1.6× scale in the original waifu2x

According to the code of original waifu2x, 1.6x is achieved by upscaling to 2x and then down to 1.6x. You can chain this program with other programs (e.g. imagemagick) to have the same result.

imxieyi avatar Sep 02 '20 18:09 imxieyi

Adding -i makes it much easier to parse arguments. I don't think it is worth removing this considering that it doesn't affect usage at all.

I don't know how arguments are parsed in Swift, but it's not hard in other languages with external packages.

According to the code of original waifu2x, 1.6x is achieved by upscaling to 2x and then down to 1.6x. You can chain this program with other programs (e.g. imagemagick) to have the same result.

I didn't see you answered how waifu2x achieves the 1.6x in another issue. I'm sorry.

Toufukun avatar Sep 03 '20 11:09 Toufukun