IImageOptimizer Interface

Summary

An interface for describing an image optimizer.
graph BT Type-.->Interface0["ICloneable"] Type["IImageOptimizer"] class Type type-node Implementing0["PunyPngOptimizer"]-.->Type click Implementing0 "/api/Cake.ImageOptimizer/PunyPngOptimizer" Implementing1["GifsicleOptimizer"]-.->Type click Implementing1 "/api/Cake.ImageOptimizer/GifsicleOptimizer" Implementing2["SmushItOptimizer"]-.->Type click Implementing2 "/api/Cake.ImageOptimizer/SmushItOptimizer" Implementing3["PngOutOptimizer"]-.->Type click Implementing3 "/api/Cake.ImageOptimizer/PngOutOptimizer" Implementing4["KrakenOptimizer"]-.->Type click Implementing4 "/api/Cake.ImageOptimizer/KrakenOptimizer" Implementing5["JpegTranOptimizer"]-.->Type click Implementing5 "/api/Cake.ImageOptimizer/JpegTranOptimizer"

Syntax

public interface IImageOptimizer : ICloneable

Properties

Name Value Summary
Extensions IList<string>
A list of extensions supported by the Optimizer
FileSize int
Gets the maximum file size to optimize.
Name string
Gets the name of the service used to optimize the image.

Methods

Name Value Summary
Configure(ICakeEnvironment) void
Configure the optimizer
Optimize(FilePath) ImageOptimizerResult
Optimizes the specified file.
Supports(string) bool
Does the optimzer support the image

Extension Methods

Name Value Summary
Dump<IImageOptimizer>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<IImageOptimizer>(IImageOptimizer[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<IImageOptimizer>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
NotNull<IImageOptimizer>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
ThrowIfNull<IImageOptimizer>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<IImageOptimizer>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin