The Image Resize Pad Mode is described as:
Pad: adds a padding so that the target image is exactly of width and height.
However, that is not technically true without adding in the following code:
settings.Scale = ScaleMode.Both;
This forces the scaling of both dimensions whereas in the current code it will not pad out the smaller of the dimensions - described here:
I placed the above code in line 45 so it is just applies to the "pad" case and won't influence the other defaults.