C# Класс NContrib.Drawing.ImageSizeHelper

Показать файл Открыть проект

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

Метод Описание
GetBmpImageSize ( Stream stream ) : Size

Reads the size of a BMP image from this stream at the current offset Rewinds the stream to where it started when finished

GetGifImageSize ( Stream stream ) : Size

Reads the size of a GIF image from this stream at the current offset Rewinds the stream to where it started when finished

GetImageSize ( Stream stream ) : Size

Tries to use the GNV fast image size checkers for JPEG, GIF, PNG, and BMP Uses .NET newing-up an Image object as a fallback

GetImageSize ( string imagePath ) : Size

Tries to use the GNV fast image size checkers for JPEG, GIF, PNG, and BMP Uses .NET newing-up an Image object as a fallback

GetJpegImageSize ( Stream stream ) : Size

Reads a JPEG image's dimensions and returns a Size object. Much faster than using the built in System.Drawing.Image class which loads the entire image into memory Rewinds the stream after reading.

GetPngImageSize ( Stream stream ) : Size

Reads the size of a PNG image from this stream at the current offset Rewinds the stream to where it started when finished

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

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

Reads the size of a BMP image from this stream at the current offset Rewinds the stream to where it started when finished
public static GetBmpImageSize ( Stream stream ) : Size
stream Stream
Результат System.Drawing.Size

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

Reads the size of a GIF image from this stream at the current offset Rewinds the stream to where it started when finished
public static GetGifImageSize ( Stream stream ) : Size
stream Stream
Результат System.Drawing.Size

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

Tries to use the GNV fast image size checkers for JPEG, GIF, PNG, and BMP Uses .NET newing-up an Image object as a fallback
public static GetImageSize ( Stream stream ) : Size
stream Stream
Результат System.Drawing.Size

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

Tries to use the GNV fast image size checkers for JPEG, GIF, PNG, and BMP Uses .NET newing-up an Image object as a fallback
public static GetImageSize ( string imagePath ) : Size
imagePath string
Результат System.Drawing.Size

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

Reads a JPEG image's dimensions and returns a Size object. Much faster than using the built in System.Drawing.Image class which loads the entire image into memory Rewinds the stream after reading.
Thrown when the Stream is not a JPEG image
public static GetJpegImageSize ( Stream stream ) : Size
stream Stream
Результат System.Drawing.Size

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

Reads the size of a PNG image from this stream at the current offset Rewinds the stream to where it started when finished
public static GetPngImageSize ( Stream stream ) : Size
stream Stream
Результат System.Drawing.Size