IImageOptimizer Interface

Summary

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

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.Ftp addin
NotNull<IImageOptimizer>(string) void
Requires the Cake.Issues 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
ThrowIfNull<IImageOptimizer>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin