Phatch is a fantastic tool to process a large number of photos in the same manner. For example, I use it to shrink images to show on a digital picture frame. Unfortunately it has not been maintained for years, and it will not start on recent versions of Ubuntu. Here’s a workaround.
This is a companion discussion topic for the original entry at https://www.xltoolbox.net/blog/2017/07/getting-phatch-to-work-on-ubuntu-17-dot-04.html