hnm4: change width/height to int to fix hypothetical integer overflows