How to change input and output gamma in 3ds Max 2014 or newer?

This may be sometimes required if your images save or load "washed out" or with too much contrast, or if you opened an old scene where these settings were altered, and 3ds Max adopted the old settings. Below is a guide on how to override the "input" and "output" gamma values which are unavailable in the UI in 2014 and newer versions:

See also: How to configure gamma?