Applescript makes lighter vertical edges on portrait images when converting to black and white
I have an Applescript which takes the images in a folder and converts them to black and white. I have a problem with portrait images. The vertical edges of the images are lighter than the main body of the images. This problem does not happen with any other images e.g. landscape, square.
The script begins with Ask Finder for Items. This is followed by a Get Selected Finder Items. Finally I have a Apply Quartz Composition Filter to Image Files using Black and White as the filter.
Any suggestions as to what I am doing wrong. Thanks
The machine is a Mac Mini running macOS 10.14.3
Mac mini, macOS 10.14