constant NMIMAGEINPUT #20

instead of global var $NMIMAGEINPUT