-
Notifications
You must be signed in to change notification settings - Fork 7
/
ITranscodeCalculator.cs
31 lines (29 loc) · 1.62 KB
/
ITranscodeCalculator.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Tricycle.Models;
namespace Tricycle.Utilities
{
public interface ITranscodeCalculator
{
/// <summary>
/// Calculates crop parameters.
/// </summary>
/// <param name="sourceDimensions">The dimensions of the source.</param>
/// <param name="storageDimensions">The storage dimensions of the source.</param>
/// <param name="autocropParameters">The detected crop parameters.</param>
/// <param name="aspectRatio">The desired aspect ratio if different than source.</param>
/// <param name="divisor">The number that height and width should be divisible by.</param>
/// <returns>The calculated crop parameters.</returns>
CropParameters CalculateCropParameters(Dimensions sourceDimensions,
Dimensions storageDimensions,
CropParameters autocropParameters,
double? aspectRatio,
int divisor);
/// <summary>
/// Calculates dimensions to use for scaling that preserve aspect ratio.
/// </summary>
/// <param name="sourceDimensions">The dimensions of the source.</param>
/// <param name="targetDimensions">The desired dimensions of the destination.</param>
/// <param name="divisor">The number that height and width should be divisible by.</param>
/// <returns>The calculated scaled dimensions.</returns>
Dimensions CalculateScaledDimensions(Dimensions sourceDimensions, Dimensions targetDimensions, int divisor);
}
}