This page is edited from the 1cmdfaq.txt faq-file contained in
mytscmd.zip
command line interface (CLI) collection. That zipped file has much
additional material, including a number of detached .cmd script
files. It is recommended that you also get the zipped version as a
companion.

Another option is the NConvert command line program. The advantage of
NConvert is that it does not require a Windows installation. It is a
ready to run utility in the CLI. The disadvantage is that unlike in
IrfanView /resize_long we need to know in advance whether the image is
vertical or horizontal.