For those looking for a DIY solution, ImageMagick is the tool
I hate the thing personally[1], but GIMP would likely be a better graphic manipulation suggestion, in this context.
Of course, once you've worked out what you're after, and want to manipulate tens or thousands of images, ImageMagick's your wizard.
.
[1] I'd just download a trial of AffinityPhoto and use that