mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
670 B
21 lines
670 B
// <copyright file="ImageFactory.cs" company="James Jackson-South">
|
|
// Copyright (c) James Jackson-South and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
// </copyright>
|
|
|
|
namespace ImageSharp.Tests
|
|
{
|
|
using ImageSharp.PixelFormats;
|
|
|
|
public class ImageFactory : GenericFactory<Rgba32>
|
|
{
|
|
public override Image<Rgba32> CreateImage(byte[] bytes) => Image.Load<Rgba32>(bytes);
|
|
|
|
public override Image<Rgba32> CreateImage(int width, int height) => new Image<Rgba32>(width, height);
|
|
|
|
public override Image<Rgba32> CreateImage(Image<Rgba32> other)
|
|
{
|
|
return new Image<Rgba32>(other);
|
|
}
|
|
}
|
|
}
|
|
|