mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 10:05:44 +00:00
28 lines
745 B
C#
28 lines
745 B
C#
using FFMpegCore.FFMPEG.Enums;
|
|
using System.Drawing;
|
|
|
|
namespace FFMpegCore.FFMPEG.Argument
|
|
{
|
|
/// <summary>
|
|
/// Represents scale parameter
|
|
/// </summary>
|
|
public class ScaleArgument : Argument<Size>
|
|
{
|
|
public ScaleArgument() { }
|
|
|
|
public ScaleArgument(Size value) : base(value) { }
|
|
|
|
public ScaleArgument(int width, int height) : base(new Size(width, height)) { }
|
|
|
|
public ScaleArgument(VideoSize videosize)
|
|
{
|
|
Value = videosize == VideoSize.Original ? new Size(-1, -1) : new Size(-1, (int)videosize);
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public override string GetStringValue()
|
|
{
|
|
return $"-vf scale={Value.Width}:{Value.Height}";
|
|
}
|
|
}
|
|
}
|