// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp { using System; using Processing; using Processing.Processors; /// /// Extension methods for the type. /// public static partial class ImageExtensions { /// /// Alters the colors of the image recreating an old Kodachrome camera effect. /// /// The pixel format. /// The image this method extends. /// The . public static Image Kodachrome(this Image source) where TColor : struct, IPixel { return Kodachrome(source, source.Bounds); } /// /// Alters the colors of the image recreating an old Kodachrome camera effect. /// /// The pixel format. /// The image this method extends. /// /// The structure that specifies the portion of the image object to alter. /// /// The . public static Image Kodachrome(this Image source, Rectangle rectangle) where TColor : struct, IPixel { source.ApplyProcessor(new KodachromeProcessor(), rectangle); return source; } } }