mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
24 lines
642 B
C#
24 lines
642 B
C#
using SkiaSharp;
|
|
|
|
namespace Jellyfin.Drawing.Skia
|
|
{
|
|
/// <summary>
|
|
/// Class containing helper methods for working with SkiaSharp.
|
|
/// </summary>
|
|
public static class SkiaHelper
|
|
{
|
|
/// <summary>
|
|
/// Ensures the result is a success
|
|
/// by throwing an exception when that's not the case.
|
|
/// </summary>
|
|
/// <param name="result">The result returned by Skia.</param>
|
|
public static void EnsureSuccess(SKCodecResult result)
|
|
{
|
|
if (result != SKCodecResult.Success)
|
|
{
|
|
throw new SkiaCodecException(result);
|
|
}
|
|
}
|
|
}
|
|
}
|