#!/bin/bash # Set the desired width width=2880 # Calculate the corresponding height for 16:9 aspect ratio height=$((width * 9 / 16 )) # Loop through all JPEG files in the current directory for file in *.png; do output_file="cropped_$file" sips --cropOffset 1 1 --cropToHeightWidth $height $width "$file" --out "$output_file" echo "Resized $file to $output_file" done