📷 A modern, cross-platform, 2D Graphics library for .NET
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.
 
 

32 lines
995 B

// <copyright file="SierraLite.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Dithering
{
/// <summary>
/// Applies error diffusion based dithering using the SierraLite image dithering algorithm.
/// <see href="http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT"/>
/// </summary>
public sealed class SierraLite : ErrorDiffuser
{
/// <summary>
/// The diffusion matrix
/// </summary>
private static readonly Fast2DArray<float> SierraLiteMatrix =
new Fast2DArray<float>(new float[,]
{
{ 0, 0, 2 },
{ 1, 1, 0 }
});
/// <summary>
/// Initializes a new instance of the <see cref="SierraLite"/> class.
/// </summary>
public SierraLite()
: base(SierraLiteMatrix, 4)
{
}
}
}