Skip to content

Commit

Permalink
Fix stretching, add UHD 4:3 option
Browse files Browse the repository at this point in the history
  • Loading branch information
simontime authored May 4, 2024
1 parent 75ba1b1 commit 2d46e67
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions Brovicon/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Brovicon/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ private void boxOutputResolution_SelectedIndexChanged(object sender, EventArgs e
case 4: // HD 1920x1080
videoStandard = new Standards.HD_1920_1080();
break;
case 5: // UHD 2160 (4K)
videoStandard = new Standards.UHD_2160();
case 5: // UHD/4K 2880x2160
videoStandard = new Standards.UHD_2880_2160();
break;
case 6: // UHD/4K 3840x2160 (4K)
videoStandard = new Standards.UHD_3840_2160();
break;
default: // Shouldn't ever be reached, defaults to 1920x1080
videoStandard = new Standards.HD_1920_1080();
Expand Down Expand Up @@ -323,7 +326,7 @@ private async void btnConvert_Click(object sender, EventArgs e)
cropRatio = string2Ratio(boxCrop.Text);

if (boxStretch.Enabled)
cropRatio = string2Ratio(boxCrop.Text);
stretchRatio = string2Ratio(boxStretch.Text);

// Dimensions and ratios
var originalHeight = videoInformation.Height;
Expand Down
20 changes: 19 additions & 1 deletion Brovicon/Standards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,25 @@ public class HD_1920_1080 : IStandard
public int GetHeight() => 1080;
}

public class UHD_2160 : IStandard
public class UHD_2880_2160 : IStandard
{
// All combinations allowed
public string[] GetAllowedFrameRates() => new string[] {
"23.976p",
"24p",
"25p",
"29.97p",
"30p",
"50p",
"59.94p",
"60p",
};

public int GetWidth() => 2880;
public int GetHeight() => 2160;
}

public class UHD_3840_2160 : IStandard
{
// All combinations allowed
public string[] GetAllowedFrameRates() => new string[] {
Expand Down

0 comments on commit 2d46e67

Please sign in to comment.