C# Class Imazen.LightResize.Encoding

Provides adjustable Jpeg encoding and 32-bit PNG encoding methods
Afficher le fichier Open project: imazen/lightresize

Méthodes publiques

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

Method Details

GetImageCodecInfo() public static méthode

Looks up encoders by mime-type
public static GetImageCodecInfo ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo
mimeType string
Résultat System.Drawing.Imaging.ImageCodecInfo

SaveJpeg() public static méthode

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

SavePng() public static méthode

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