Fix magic numbers in resize script

The magic numbers were hardcoded in the resize code.
Merge branch 'fix-magic-numbers'