You can do that in Imagemagick with some Unix shell commands as follows. The basic idea is to average the image to one column, then search the column for the y coordinate of the red pixel. Then use that to crop the image into two parts.
INPUT:

width=$(convert -ping tRbWW.png -format "%w" info:)
height=$(convert -ping tRbWW.png -format "%h" info:)
y=$(convert tRbWW.png -alpha off -scale 1x! -fuzz 20% -fill red -opaque red txt:- | grep "red" | head -n 1 | cut -d: -f1 | cut -d, -f2)
height1=$((y+1))
height2=$((height-y+1))
convert tRbWW.png \
\( -clone 0 -gravity north -crop ${width}x${height1}+0+0 +repage +write top.png \) \
\( -clone 0 -gravity south -crop ${width}x${height2}+0+0 +repage +write bottom.png \) \
null:
Top:

Bottom:
