C# Класс Imazen.LightResize.Encoding

Provides adjustable Jpeg encoding and 32-bit PNG encoding methods
Показать файл Открыть проект

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

Метод Описание
GetImageCodecInfo ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo

Looks up encoders by mime-type

SaveJpeg ( Image b, Stream target, int quality ) : void

Saves the specified image to the specified stream using jpeg compression of the specified quality.

SavePng ( Image img, Stream target ) : void

Saves the image in png form. If Stream 'target' is not seekable, a temporary MemoryStream will be used to buffer the image data into the stream

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

GetImageCodecInfo() публичный статический Метод

Looks up encoders by mime-type
public static GetImageCodecInfo ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo
mimeType string
Результат System.Drawing.Imaging.ImageCodecInfo

SaveJpeg() публичный статический Метод

Saves the specified image to the specified stream using jpeg compression of the specified quality.
public static SaveJpeg ( Image b, Stream target, int quality ) : void
b Image
target Stream
quality int A number between 0 and 100. Defaults to 90 if passed a negative number. Numbers over 100 are truncated to 100. /// 90 is a *very* good setting. ///
Результат void

SavePng() публичный статический Метод

Saves the image in png form. If Stream 'target' is not seekable, a temporary MemoryStream will be used to buffer the image data into the stream
public static SavePng ( Image img, Stream target ) : void
img Image
target Stream
Результат void