It looks like a problem with your ImageMagick policy.xml file having too low a height setting.
https://askubuntu.com/questions/1041349/imagemagick-command-line-convert-limit-values
/etc/ImageMagick-6/policy.xml
sudo chmod 777 policy.xml
Edit this line to a higher value than what you currently have:
<policy domain="resource" name="height" value="16MP"/>
chmod 744 policy.xml