# Get the width of the image
width=$(identify -format "%w" input.jpg)

# Calculate half of the width
half_width=$((width / 2))

# Split the image into two parts
convert input.jpg -crop ${half_width}x+0+0 +repage left_part.jpg
convert input.jpg -crop ${half_width}x+${half_width}+0 +repage right_part.jpg
