C# Класс ImageMagick.ImageOptimizer

Class that can be used to optimize an image.
Наследование: ILosslessImageOptimizer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
CreateImageOptimizers ( ) : Collection
DoLosslessCompress ( FileInfo file ) : void
GetFormatInformation ( FileInfo file ) : MagickFormatInfo
GetOptimizer ( FileInfo file ) : ILosslessImageOptimizer

Описание методов

IsSupported() публичный метод

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.
Результат bool

IsSupported() публичный метод

Returns true when the supplied formation information is supported.
public IsSupported ( MagickFormatInfo formatInfo ) : bool
formatInfo MagickFormatInfo The format information to check.
Результат bool

IsSupported() публичный метод

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.
Результат bool

LosslessCompress() публичный метод

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
Результат void

LosslessCompress() публичный метод

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
Результат void