-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #546 from brett-baker/main
Add Copy option to Audio Codec. Add Crop option to Arguments
- Loading branch information
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Drawing; | ||
|
||
namespace FFMpegCore.Arguments | ||
{ | ||
public class CropArgument : IArgument | ||
{ | ||
public readonly Size? Size; | ||
public readonly int Top; | ||
public readonly int Left; | ||
|
||
public CropArgument(Size? size, int top, int left) | ||
{ | ||
Size = size; | ||
Top = top; | ||
Left = left; | ||
} | ||
|
||
public CropArgument(int width, int height, int top, int left) : this(new Size(width, height), top, left) { } | ||
|
||
public string Text => Size == null ? string.Empty : $"-vf crop={Size.Value.Width}:{Size.Value.Height}:{Left}:{Top}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters