C# Class ImageMagick.ImageOptimizer

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

Méthodes publiques

Méthode 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

Méthode Description
CreateImageOptimizers ( ) : Collection
DoLosslessCompress ( FileInfo file ) : void
GetFormatInformation ( FileInfo file ) : MagickFormatInfo
GetOptimizer ( FileInfo file ) : ILosslessImageOptimizer

Method Details

IsSupported() public méthode

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.
Résultat bool

IsSupported() public méthode

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

IsSupported() public méthode

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.
Résultat bool

LosslessCompress() public méthode

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
Résultat void

LosslessCompress() public méthode

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
Résultat void