C# Class ImageMagick.ImageOptimizer

Class that can be used to optimize an image.
Inheritance: ILosslessImageOptimizer
Show file Open project: dlemstra/Magick.NET Class Usage Examples

Public Methods

Method Description
IsSupported ( FileInfo file ) : bool

Returns true when the supplied file name is supported based on the extension of the file.

IsSupported ( MagickFormatInfo formatInfo ) : bool

Returns true when the supplied formation information is supported.

IsSupported ( string fileName ) : bool

Returns true when the supplied file name is supported based on the extension of the file.

LosslessCompress ( FileInfo file ) : void

Performs lossless compression on the file. If the new file size is not smaller the file won't be overwritten.

LosslessCompress ( string fileName ) : void

Performs lossless compression on speified the file. If the new file size is not smaller the file won't be overwritten.

Private Methods

Method Description
CreateImageOptimizers ( ) : Collection
DoLosslessCompress ( FileInfo file ) : void
GetFormatInformation ( FileInfo file ) : MagickFormatInfo
GetOptimizer ( FileInfo file ) : ILosslessImageOptimizer

Method Details

IsSupported() public method

Returns true when the supplied file name is supported based on the extension of the file.
public IsSupported ( FileInfo file ) : bool
file System.IO.FileInfo The file to check.
return bool

IsSupported() public method

Returns true when the supplied formation information is supported.
public IsSupported ( MagickFormatInfo formatInfo ) : bool
formatInfo MagickFormatInfo The format information to check.
return bool

IsSupported() public method

Returns true when the supplied file name is supported based on the extension of the file.
public IsSupported ( string fileName ) : bool
fileName string The name of the file to check.
return bool

LosslessCompress() public method

Performs lossless compression on the file. If the new file size is not smaller the file won't be overwritten.
public LosslessCompress ( FileInfo file ) : void
file System.IO.FileInfo The image file to optimize
return void

LosslessCompress() public method

Performs lossless compression on speified the file. If the new file size is not smaller the file won't be overwritten.
public LosslessCompress ( string fileName ) : void
fileName string The name of the image file to optimize
return void