{\r
// We have no instructions, so simply set it to the source.\r
this.Task.Width = this.GetModulusValue(this.sourceResolution.Width - this.CropLeft - this.CropRight);\r
+ this.Task.Height = this.GetModulusValue(this.sourceResolution.Height - this.CropTop - this.CropBottom);\r
this.MaintainAspectRatio = true;\r
}\r
else\r
{\r
- // Set the Max Width / Height available to the user controls\r
+ // Set the Max Width / Height available to the user controls.\r
+ this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;\r
if (this.sourceResolution.Width < this.MaxWidth)\r
{\r
this.MaxWidth = this.sourceResolution.Width;\r
}\r
- else if (this.sourceResolution.Width > this.MaxWidth)\r
- {\r
- this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;\r
- }\r
\r
+ this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;\r
if (this.sourceResolution.Height < this.MaxHeight)\r
{\r
this.MaxHeight = this.sourceResolution.Height;\r
}\r
- else if (this.sourceResolution.Height > this.MaxHeight)\r
- {\r
- this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;\r
- }\r
\r
// Set the Width, and Maintain Aspect ratio. That should calc the Height for us.\r
if (this.SelectedAnamorphicMode == Anamorphic.None)\r
{\r
- this.Task.Width = preset.Task.Width ?? (this.MaxWidth - this.CropLeft - this.CropRight);\r
+ this.Task.Width = preset.Task.Width ?? this.GetModulusValue(this.MaxWidth - this.CropLeft - this.CropRight);\r
+ this.Task.Height = this.GetModulusValue(this.MaxHeight - this.CropTop - this.CropBottom);\r
// Note: This will be auto-corrected in the property if it's too large.\r
}\r
else\r