// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; using SixLabors.ImageSharp.PixelFormats; namespace SixLabors.ImageSharp.Tests { /// /// Provides instances for parametric unit tests. /// /// The pixel format of the image public abstract partial class TestImageProvider where TPixel : struct, IPixel { private class LambdaProvider : TestImageProvider { private readonly Func, Image> creator; public LambdaProvider(Func, Image> creator) { this.creator = creator; } public override Image GetImage() => this.creator(this.Factory); } } }