this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();\r
this.label7 = new System.Windows.Forms.Label();\r
this.lbl_src_res = new System.Windows.Forms.Label();\r
- this.Label91 = new System.Windows.Forms.Label();\r
- this.lbl_Aspect = new System.Windows.Forms.Label();\r
this.Label55 = new System.Windows.Forms.Label();\r
this.text_width = new System.Windows.Forms.NumericUpDown();\r
- this.lbl_max = new System.Windows.Forms.Label();\r
this.label4 = new System.Windows.Forms.Label();\r
this.text_height = new System.Windows.Forms.NumericUpDown();\r
this.check_KeepAR = new System.Windows.Forms.CheckBox();\r
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
this.tableLayoutPanel2.Controls.Add(this.label7, 0, 0);\r
this.tableLayoutPanel2.Controls.Add(this.lbl_src_res, 1, 0);\r
- this.tableLayoutPanel2.Controls.Add(this.Label91, 2, 0);\r
- this.tableLayoutPanel2.Controls.Add(this.lbl_Aspect, 3, 0);\r
this.tableLayoutPanel2.Controls.Add(this.Label55, 0, 1);\r
this.tableLayoutPanel2.Controls.Add(this.text_width, 1, 1);\r
- this.tableLayoutPanel2.Controls.Add(this.lbl_max, 4, 1);\r
this.tableLayoutPanel2.Controls.Add(this.label4, 2, 1);\r
this.tableLayoutPanel2.Controls.Add(this.text_height, 3, 1);\r
this.tableLayoutPanel2.Controls.Add(this.check_KeepAR, 1, 2);\r
this.lbl_src_res.TabIndex = 77;\r
this.lbl_src_res.Text = "--";\r
// \r
- // Label91\r
- // \r
- this.Label91.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
- this.Label91.AutoSize = true;\r
- this.Label91.BackColor = System.Drawing.Color.Transparent;\r
- this.Label91.ImeMode = System.Windows.Forms.ImeMode.NoControl;\r
- this.Label91.Location = new System.Drawing.Point(120, 3);\r
- this.Label91.Margin = new System.Windows.Forms.Padding(3);\r
- this.Label91.Name = "Label91";\r
- this.Label91.Size = new System.Drawing.Size(72, 13);\r
- this.Label91.TabIndex = 78;\r
- this.Label91.Text = "Aspect Ratio:";\r
- // \r
- // lbl_Aspect\r
- // \r
- this.lbl_Aspect.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
- this.lbl_Aspect.AutoSize = true;\r
- this.lbl_Aspect.BackColor = System.Drawing.Color.Transparent;\r
- this.lbl_Aspect.ImeMode = System.Windows.Forms.ImeMode.NoControl;\r
- this.lbl_Aspect.Location = new System.Drawing.Point(198, 3);\r
- this.lbl_Aspect.Margin = new System.Windows.Forms.Padding(3);\r
- this.lbl_Aspect.Name = "lbl_Aspect";\r
- this.lbl_Aspect.Size = new System.Drawing.Size(15, 13);\r
- this.lbl_Aspect.TabIndex = 79;\r
- this.lbl_Aspect.Text = "--";\r
- // \r
// Label55\r
// \r
this.Label55.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
this.text_width.TabIndex = 85;\r
this.text_width.ValueChanged += new System.EventHandler(this.TextWidthValueChanged);\r
// \r
- // lbl_max\r
- // \r
- this.lbl_max.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
- this.lbl_max.AutoSize = true;\r
- this.lbl_max.ImeMode = System.Windows.Forms.ImeMode.NoControl;\r
- this.lbl_max.Location = new System.Drawing.Point(268, 26);\r
- this.lbl_max.Margin = new System.Windows.Forms.Padding(3);\r
- this.lbl_max.Name = "lbl_max";\r
- this.lbl_max.Size = new System.Drawing.Size(15, 13);\r
- this.lbl_max.TabIndex = 83;\r
- this.lbl_max.Text = "--";\r
- this.lbl_max.DoubleClick += new System.EventHandler(this.LblMaxDoubleClick);\r
- // \r
// label4\r
// \r
this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
// \r
// text_height\r
// \r
- this.text_height.Location = new System.Drawing.Point(198, 22);\r
+ this.text_height.Location = new System.Drawing.Point(168, 22);\r
this.text_height.Maximum = new decimal(new int[] {\r
2560,\r
0,\r
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;\r
internal System.Windows.Forms.Label label7;\r
internal System.Windows.Forms.Label lbl_src_res;\r
- internal System.Windows.Forms.Label Label91;\r
- internal System.Windows.Forms.Label lbl_Aspect;\r
internal System.Windows.Forms.Label Label55;\r
- private System.Windows.Forms.Label lbl_max;\r
internal System.Windows.Forms.Label label4;\r
internal System.Windows.Forms.CheckBox check_KeepAR;\r
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
/* PictureSetting.cs $\r
- \r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
\r
namespace Handbrake.Controls\r
{\r
using Parsing;\r
using Presets;\r
\r
+ /// <summary>\r
+ /// The Picture Settings Panel\r
+ /// </summary>\r
public partial class PictureSettings : UserControl\r
{\r
private readonly CultureInfo culture = new CultureInfo("en-US", false);\r
- public event EventHandler PictureSettingsChanged;\r
-\r
private bool preventChangingWidth;\r
private bool preventChangingHeight;\r
private bool preventChangingCustom;\r
private bool preventChangingDisplayWidth;\r
- private int presetMaximumWidth;\r
- private int presetMaximumHeight;\r
private double cachedDar;\r
private Title sourceTitle;\r
\r
drp_modulus.SelectedIndex = 0;\r
}\r
\r
+ /// <summary>\r
+ /// Picture Settings Changed Event Handler\r
+ /// </summary>\r
+ public event EventHandler PictureSettingsChanged;\r
+\r
/// <summary>\r
/// Gets or sets the source media used by this control.\r
/// </summary>\r
public Title Source\r
{\r
- private get { return sourceTitle; }\r
+ private get\r
+ {\r
+ return sourceTitle;\r
+ }\r
+\r
set\r
{\r
sourceTitle = value;\r
}\r
\r
/// <summary>\r
- /// Which preset is currently selected by the user.\r
+ /// Gets or sets the currently selected preset.\r
/// </summary>\r
public Preset CurrentlySelectedPreset { get; set; }\r
\r
/// Gets or sets the maximum allowable size for the encoded resolution. Set a value to\r
/// "0" if the maximum does not matter.\r
/// </summary>\r
- public Size PresetMaximumResolution\r
- {\r
- get { return new Size(presetMaximumWidth, presetMaximumHeight); }\r
- set\r
- {\r
- presetMaximumWidth = value.Width;\r
- presetMaximumHeight = value.Height;\r
-\r
- if (value.Width != 0 && value.Height != 0)\r
- lbl_max.Text = "Max Width / Height";\r
- else if (value.Width != 0)\r
- lbl_max.Text = "Max Width";\r
- else if (value.Height != 0)\r
- lbl_max.Text = "Max Height";\r
- else\r
- lbl_max.Text = string.Empty;\r
- }\r
- }\r
+ public Size PresetMaximumResolution { get; set; }\r
\r
/// <summary>\r
/// Set the Preset Crop Warning Label\r
/// </summary>\r
- /// <param name="selectedPreset"></param>\r
+ /// <param name="selectedPreset">\r
+ /// The Selected preset\r
+ /// </param>\r
public void SetPresetCropWarningLabel(Preset selectedPreset)\r
{\r
lbl_presetCropWarning.Visible = true;\r
private void NewSourceSet()\r
{\r
// Set the Aspect Ratio\r
- lbl_Aspect.Text = sourceTitle.AspectRatio.ToString(culture);\r
lbl_src_res.Text = sourceTitle.Resolution.Width + " x " + sourceTitle.Resolution.Height;\r
\r
// Set the Recommended Cropping values, but only if a preset doesn't have hard set picture settings.\r
- if ((CurrentlySelectedPreset != null && CurrentlySelectedPreset.PictureSettings == false) ||\r
- CurrentlySelectedPreset == null)\r
+ if ((CurrentlySelectedPreset != null && CurrentlySelectedPreset.PictureSettings == false) || CurrentlySelectedPreset == null)\r
{\r
crop_top.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions[0]);\r
crop_bottom.Value = GetCropMod2Clean(sourceTitle.AutoCropDimensions[1]);\r
// Set the Resolution Boxes\r
if (drp_anamorphic.SelectedIndex == 0)\r
{\r
- if (text_width.Value == 0) // Only update the values if the fields don't already have values.\r
- text_width.Value = sourceTitle.Resolution.Width;\r
+ int width = sourceTitle.Resolution.Width;\r
+\r
+ if (width > PresetMaximumResolution.Width && PresetMaximumResolution.Width != 0) // If the preset has a Max width set, don't use a width larger than it.\r
+ width = PresetMaximumResolution.Width;\r
+\r
+ if (text_width.Value == 0 || (text_width.Value > PresetMaximumResolution.Width && PresetMaximumResolution.Width != 0)) // Only update the values if the fields don't already have values.\r
+ text_width.Value = width;\r
\r
check_KeepAR.Checked = true; // Forces Resolution to be correct.\r
}\r
else\r
{\r
- if (text_width.Value == 0 && text_height.Value == 0)\r
- // Only update the values if the fields don't already have values.\r
- {\r
- text_width.Value = sourceTitle.Resolution.Width;\r
- text_height.Value = sourceTitle.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;\r
- }\r
+ int width = sourceTitle.Resolution.Width;\r
+ if (width > PresetMaximumResolution.Width && PresetMaximumResolution.Width != 0) // If the preset has a Max width set, don't use a width larger than it.\r
+ width = PresetMaximumResolution.Width;\r
+\r
+ int height = sourceTitle.Resolution.Height;\r
+ if (height > PresetMaximumResolution.Height && PresetMaximumResolution.Height != 0) // If the preset has a Max height set, don't use a width larger than it.\r
+ height = PresetMaximumResolution.Height;\r
+\r
+ text_width.Value = width;\r
+ text_height.Value = height - (int)crop_top.Value - (int)crop_bottom.Value;\r
\r
labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
}\r
updownParHeight.Value = sourceTitle.ParVal.Height;\r
\r
Size croppedDar = CalculateAnamorphicSizes();\r
- cachedDar = (double) croppedDar.Width/croppedDar.Height;\r
+ cachedDar = (double)croppedDar.Width / croppedDar.Height;\r
updownDisplayWidth.Value = croppedDar.Width;\r
}\r
\r
{\r
preventChangingHeight = true;\r
\r
- int width = (int) text_width.Value;\r
+ int width = (int)text_width.Value;\r
\r
- double crop_width = Source.Resolution.Width - (int) crop_left.Value - (int) crop_right.Value;\r
- double crop_height = Source.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;\r
+ double crop_width = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+ double crop_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
\r
if (SourceAspect.Width == 0 && SourceAspect.Height == 0)\r
break;\r
\r
- double newHeight = ((double) width*Source.Resolution.Width*SourceAspect.Height*crop_height)/\r
- (Source.Resolution.Height*SourceAspect.Width*crop_width);\r
- text_height.Value = (decimal) GetModulusValue(newHeight);\r
+ double newHeight = ((double)width * Source.Resolution.Width * SourceAspect.Height * crop_height) /\r
+ (Source.Resolution.Height * SourceAspect.Width * crop_width);\r
+ text_height.Value = (decimal)GetModulusValue(newHeight);\r
\r
preventChangingHeight = false;\r
}\r
break;\r
\r
preventChangingDisplayWidth = true;\r
- updownDisplayWidth.Value = text_width.Value*updownParWidth.Value/updownParHeight.Value;\r
+ updownDisplayWidth.Value = text_width.Value * updownParWidth.Value / updownParHeight.Value;\r
preventChangingDisplayWidth = false;\r
\r
labelDisplaySize.Text = Math.Truncate(updownDisplayWidth.Value) + "x" + text_height.Value;\r
{\r
preventChangingWidth = true;\r
\r
- double crop_width = Source.Resolution.Width - (int) crop_left.Value - (int) crop_right.Value;\r
- double crop_height = Source.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;\r
+ double crop_width = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+ double crop_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
\r
- double new_width = ((double) text_height.Value*Source.Resolution.Height*SourceAspect.Width*\r
- crop_width)/\r
- (Source.Resolution.Width*SourceAspect.Height*crop_height);\r
+ double new_width = ((double)text_height.Value * Source.Resolution.Height * SourceAspect.Width *\r
+ crop_width) /\r
+ (Source.Resolution.Width * SourceAspect.Height * crop_height);\r
\r
- text_width.Value = (decimal) GetModulusValue(new_width);\r
+ text_width.Value = (decimal)GetModulusValue(new_width);\r
\r
preventChangingWidth = false;\r
}\r
// - Changes PIXEL HEIGHT to STORAGE WIDTH\r
// DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)\r
\r
- double rawCalculatedDisplayWidth = (double) text_height.Value*cachedDar;\r
+ double rawCalculatedDisplayWidth = (double)text_height.Value * cachedDar;\r
\r
preventChangingDisplayWidth = true; // Start Guards\r
preventChangingWidth = true;\r
\r
- updownDisplayWidth.Value = (decimal) rawCalculatedDisplayWidth;\r
+ updownDisplayWidth.Value = (decimal)rawCalculatedDisplayWidth;\r
updownParWidth.Value = updownDisplayWidth.Value;\r
updownParHeight.Value = text_width.Value;\r
\r
if (!int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus))\r
modulus = 16;\r
\r
- int rawCalculatedHeight = (int) ((int) updownDisplayWidth.Value/cachedDar);\r
- int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight%modulus);\r
+ int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / cachedDar);\r
+ int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);\r
\r
// Update value\r
preventChangingHeight = true;\r
- text_height.Value = (decimal) modulusHeight;\r
+ text_height.Value = (decimal)modulusHeight;\r
updownParWidth.Value = updownDisplayWidth.Value;\r
updownParHeight.Value = text_width.Value;\r
preventChangingHeight = false;\r
\r
SetCustomAnamorphicOptionsVisible(false);\r
labelStaticDisplaySize.Visible = false;\r
- labelDisplaySize.Visible = true;\r
+ labelDisplaySize.Visible = false;\r
drp_modulus.Visible = true;\r
+ lbl_modulus.Visible = true;\r
\r
// check_KeepAR.Checked = true;\r
\r
preventChangingWidth = true;\r
preventChangingHeight = true;\r
\r
- text_width.Value = (decimal) GetModulusValue((double) text_width.Value);\r
- text_height.Value = (decimal) GetModulusValue((double) text_height.Value);\r
+ text_width.Value = (decimal)GetModulusValue((double)text_width.Value);\r
+ text_height.Value = (decimal)GetModulusValue((double)text_height.Value);\r
\r
preventChangingWidth = false;\r
preventChangingHeight = false;\r
get\r
{\r
if (Source != null) // display aspect = (width * par_width) / (height * par_height)\r
- return new Size((Source.ParVal.Width*Source.Resolution.Width), \r
- (Source.ParVal.Height*Source.Resolution.Height));\r
+ return new Size((Source.ParVal.Width * Source.Resolution.Width),\r
+ (Source.ParVal.Height * Source.Resolution.Height));\r
\r
return new Size(0, 0); // Fall over to 16:9 and hope for the best\r
}\r
if (Source != null)\r
{\r
/* Set up some variables to make the math easier to follow. */\r
- int croppedWidth = Source.Resolution.Width - (int) crop_left.Value - (int) crop_right.Value;\r
- int croppedHeight = Source.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;\r
- double storageAspect = (double) croppedWidth/croppedHeight;\r
+ int croppedWidth = Source.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+ int croppedHeight = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
+ double storageAspect = (double)croppedWidth / croppedHeight;\r
\r
/* Figure out what width the source would display at. */\r
- double sourceDisplayWidth = (double) croppedWidth*Source.ParVal.Width/Source.ParVal.Height;\r
+ double sourceDisplayWidth = (double)croppedWidth * Source.ParVal.Width / Source.ParVal.Height;\r
\r
/*\r
3 different ways of deciding output dimensions:\r
default:\r
case 1:\r
/* Strict anamorphic */\r
- double displayWidth = ((double) croppedWidth*Source.ParVal.Width/Source.ParVal.Height);\r
+ double displayWidth = ((double)croppedWidth * Source.ParVal.Width / Source.ParVal.Height);\r
displayWidth = Math.Round(displayWidth, 0);\r
- Size output = new Size((int) displayWidth, croppedHeight);\r
+ Size output = new Size((int)displayWidth, croppedHeight);\r
return output;\r
case 2:\r
/* "Loose" anamorphic.\r
- Uses mod16-compliant dimensions,\r
- Allows users to set the width\r
*/\r
- width = (int) text_width.Value;\r
+ width = (int)text_width.Value;\r
width = GetModulusValue(width); /* Time to get picture width that divide cleanly.*/\r
\r
- height = (width/storageAspect) + 0.5;\r
+ height = (width / storageAspect) + 0.5;\r
height = GetModulusValue(height); /* Time to get picture height that divide cleanly.*/\r
\r
/* The film AR is the source's display width / cropped source height.\r
The output display width is the output height * film AR.\r
The output PAR is the output display width / output storage width. */\r
- double pixelAspectWidth = height*sourceDisplayWidth/croppedHeight;\r
+ double pixelAspectWidth = height * sourceDisplayWidth / croppedHeight;\r
double pixelAspectHeight = width;\r
\r
- double disWidthLoose = (width*pixelAspectWidth/pixelAspectHeight);\r
+ double disWidthLoose = (width * pixelAspectWidth / pixelAspectHeight);\r
if (double.IsNaN(disWidthLoose))\r
disWidthLoose = 0;\r
- return new Size((int) disWidthLoose, (int) height);\r
+ return new Size((int)disWidthLoose, (int)height);\r
case 3:\r
\r
// Get the User Interface Values\r
double.TryParse(updownDisplayWidth.Text, out UIdisplayWidth);\r
\r
/* Anamorphic 3: Power User Jamboree - Set everything based on specified values */\r
- height = GetModulusValue((double) text_height.Value);\r
+ height = GetModulusValue((double)text_height.Value);\r
\r
if (check_KeepAR.Checked)\r
- return new Size((int) Math.Truncate(UIdisplayWidth), (int) height);\r
+ return new Size((int)Math.Truncate(UIdisplayWidth), (int)height);\r
\r
- return new Size((int) Math.Truncate(UIdisplayWidth), (int) height);\r
+ return new Size((int)Math.Truncate(UIdisplayWidth), (int)height);\r
}\r
}\r
\r
private double GetModulusValue(double value)\r
{\r
int mod = int.Parse(drp_modulus.SelectedItem.ToString());\r
- double remainder = value%mod;\r
+ double remainder = value % mod;\r
\r
if (remainder == 0)\r
return value;\r
\r
- return remainder >= ((double) mod/2) ? value + (mod - remainder) : value - remainder;\r
+ return remainder >= ((double)mod / 2) ? value + (mod - remainder) : value - remainder;\r
}\r
\r
private static int GetCropMod2Clean(int value)\r
{\r
- int remainder = value%2;\r
+ int remainder = value % 2;\r
if (remainder == 0) return value;\r
return (value + remainder);\r
}\r
-\r
- // Hidden UI feature to drop the MaxWidth / Height with the MaxWidth/Height label is double clicked\r
- private void LblMaxDoubleClick(object sender, EventArgs e)\r
- {\r
- PresetMaximumResolution = new Size(0, 0);\r
- if (PictureSettingsChanged != null)\r
- PictureSettingsChanged(this, new EventArgs());\r
- }\r
}\r
}
\ No newline at end of file
query += string.Format(" -c {0}", mainWindow.drop_chapterStart.Text);\r
else if (mainWindow.drop_chapterStart.Text != string.Empty &&\r
mainWindow.drop_chapterFinish.Text != string.Empty)\r
- query += string.Format(" -c {0}-{1}", mainWindow.drop_chapterStart.Text, \r
+ query += string.Format(" -c {0}-{1}", mainWindow.drop_chapterStart.Text,\r
mainWindow.drop_chapterFinish.Text);\r
break;\r
case 1: // Seconds\r
int.TryParse(mainWindow.drop_chapterFinish.Text, out end);\r
int calculatedDuration = end - start;\r
\r
- query += string.Format(" --start-at duration:{0} --stop-at duration:{1}", \r
+ query += string.Format(" --start-at duration:{0} --stop-at duration:{1}",\r
mainWindow.drop_chapterStart.Text, calculatedDuration);\r
break;\r
case 2: // Frames\r
int.TryParse(mainWindow.drop_chapterFinish.Text, out end);\r
calculatedDuration = end - start;\r
\r
- query += string.Format(" --start-at frame:{0} --stop-at frame:{1}", \r
+ query += string.Format(" --start-at frame:{0} --stop-at frame:{1}",\r
mainWindow.drop_chapterStart.Text, calculatedDuration);\r
break;\r
case 3: // Preview\r
query += " --stop-at duration:" + duration + " ";\r
\r
if (mainWindow.text_destination.Text != string.Empty)\r
- query += string.Format(" -o \"{0}\" ", \r
+ query += string.Format(" -o \"{0}\" ",\r
mainWindow.text_destination.Text.Replace(".m", "_sample.m"));\r
break;\r
default:\r
\r
#region Picture Settings Tab\r
\r
- // Use MaxWidth for built-in presets and width for user settings.\r
- if (mainWindow.PictureSettings.PresetMaximumResolution.Width == 0)\r
- {\r
- if (mainWindow.PictureSettings.text_width.Value != 0)\r
- if (mainWindow.PictureSettings.drp_anamorphic.SelectedIndex != 1)\r
- // Prevent usage for strict anamorphic\r
- query += " -w " + mainWindow.PictureSettings.text_width.Text;\r
- }\r
- else\r
- {\r
- if (mainWindow.PictureSettings.text_width.Value != 0)\r
- if (mainWindow.PictureSettings.drp_anamorphic.SelectedIndex != 1)\r
- query += " -X " + mainWindow.PictureSettings.text_width.Text;\r
- }\r
+ if (mainWindow.PictureSettings.text_width.Value != 0)\r
+ if (mainWindow.PictureSettings.drp_anamorphic.SelectedIndex != 1) // Prevent usage for strict anamorphic\r
+ query += " -w " + mainWindow.PictureSettings.text_width.Text;\r
\r
- // Use MaxHeight for built-in presets and height for user settings.\r
- if (mainWindow.PictureSettings.PresetMaximumResolution.Height == 0)\r
- {\r
- if (mainWindow.PictureSettings.text_height.Value != 0)\r
- if (mainWindow.PictureSettings.text_height.Text != string.Empty)\r
- if (mainWindow.PictureSettings.drp_anamorphic.SelectedIndex == 0 ||\r
- mainWindow.PictureSettings.drp_anamorphic.SelectedIndex == 3)\r
- // Prevent usage for strict anamorphic\r
- query += " -l " + mainWindow.PictureSettings.text_height.Text;\r
- }\r
- else\r
- {\r
- if (mainWindow.PictureSettings.text_height.Value != 0)\r
- if (mainWindow.PictureSettings.drp_anamorphic.SelectedIndex == 0 ||\r
- mainWindow.PictureSettings.drp_anamorphic.SelectedIndex == 3)\r
- query += " -Y " + mainWindow.PictureSettings.text_height.Text;\r
- }\r
+ if (mainWindow.PictureSettings.text_height.Value != 0 && mainWindow.PictureSettings.text_height.Text != string.Empty)\r
+ if (mainWindow.PictureSettings.drp_anamorphic.SelectedIndex == 0 || mainWindow.PictureSettings.drp_anamorphic.SelectedIndex == 3) // Prevent usage for strict anamorphic\r
+ query += " -l " + mainWindow.PictureSettings.text_height.Text;\r
\r
string cropTop = mainWindow.PictureSettings.crop_top.Text;\r
string cropBottom = mainWindow.PictureSettings.crop_bottom.Text;\r
break;\r
case "H.264 (x264)":\r
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
- value = 51 - mainWindow.slider_videoQuality.Value*cqStep;\r
+ value = 51 - mainWindow.slider_videoQuality.Value * cqStep;\r
value = Math.Round(value, 2);\r
query += " -q " + value.ToString(culture);\r
break;\r