Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8539bfe0f7
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (36 sloc) 1.392 kb
/////////////////////////////////////////////////////////////////////////////////
// Paint.NET //
// Copyright (C) dotPDN LLC, Rick Brewster, Tom Jackson, and contributors. //
// Portions Copyright (C) Microsoft Corporation. All Rights Reserved. //
// See license-pdn.txt for full licensing and attribution details. //
// //
// Ported to Pinta by: Jonathan Pobst <monkey@jpobst.com> //
/////////////////////////////////////////////////////////////////////////////////
using System;
using Pinta.ImageManipulation.UnaryPixelOperations;
namespace Pinta.ImageManipulation.Effects
{
public class SepiaEffect : BaseEffect
{
private DesaturateOp desat_op = new DesaturateOp ();
private LevelOp level_op = new LevelOp (
ColorBgra.Black,
ColorBgra.White,
new float[] { 1.2f, 1.0f, 0.8f },
ColorBgra.Black,
ColorBgra.White);
/// <summary>
/// Creates a new effect that will apply a sepia tone to an image.
/// </summary>
public SepiaEffect ()
{
}
#region Algorithm Code Ported From PDN
protected override void RenderLine (ISurface src, ISurface dest, Rectangle roi)
{
desat_op.Apply (src, dest, roi);
level_op.Apply (dest, dest, roi);
}
#endregion
}
}
Jump to Line
Something went wrong with that request. Please try again.