}\r
else\r
{\r
- this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;\r
- this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height; \r
+\r
+ int presetWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;\r
+ int presetHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;\r
+\r
+ this.MaxWidth = presetWidth <= this.sourceResolution.Width ? presetWidth : this.sourceResolution.Width;\r
+ this.MaxHeight = presetHeight <= this.sourceResolution.Height ? presetHeight : this.sourceResolution.Height; \r
} \r
\r
// Set the width, then check the height doesn't breach the max height and correct if necessary.\r