Resizing images with ffmpeg from Windows Send To menu

Before we begin, you need to install ffmpeg, if you haven't already. You can install ffmpeg as described in this article.

This is sample code that resizes all selected image files to 3000 pixels horizontally while maintaining the ratio.

@echo off
setlocal enabledelayedexpansion

FOR %%i IN (%*) DO (
	ffmpeg -i "%%~i" -vf scale=3000:-1 "%%~ni_3000.png"
)

Create a new file named "Resize Image 3000.bat" using Windows Explorer in the "shell:sendto" directory of your system. Paste the above code into this file. Then you can use the script by selecting the file you want to resize and from right-click context menu you need to select "Send To -> Resize Image 3000.bat". This will create a new file ending in "_3000.png" which is our resized image.

You can modify the code to resize the images according to your criteria by changing the "scale = 3000: -1" part of the code, where the first number is the desired horizontal size and the second is the desired vertical size. -1 means that the corresponding dimension will be calculated proportionally to the opposite dimension of the current image.