C# 클래스 Glue.IO.ImageHeader

Taken from http://stackoverflow.com/questions/111345/getting-image-dimensions-without-reading-the-entire-file/111349 Minor improvements including supporting unsigned 16-bit integers when decoding Jfif and added logic to load the image using new Bitmap if reading the headers fails
파일 보기 프로젝트 열기: vchelaru/FlatRedBall

공개 메소드들

메소드 설명
GetDimensions ( BinaryReader binaryReader ) : Size

Gets the dimensions of an image.

GetDimensions ( string path ) : Size

Gets the dimensions of an image.

비공개 메소드들

메소드 설명
DecodeBitmap ( BinaryReader binaryReader ) : Size
DecodeGif ( BinaryReader binaryReader ) : Size
DecodeJfif ( BinaryReader binaryReader ) : Size
DecodePng ( BinaryReader binaryReader ) : Size
ReadLittleEndianInt16 ( BinaryReader binaryReader ) : short
ReadLittleEndianInt32 ( BinaryReader binaryReader ) : int
ReadLittleEndianUInt16 ( BinaryReader binaryReader ) : ushort
StartsWith ( byte thisBytes, byte thatBytes ) : bool

메소드 상세

GetDimensions() 공개 정적인 메소드

Gets the dimensions of an image.
The image was of an unrecognised format.
public static GetDimensions ( BinaryReader binaryReader ) : Size
binaryReader System.IO.BinaryReader
리턴 System.Drawing.Size

GetDimensions() 공개 정적인 메소드

Gets the dimensions of an image.
The image was of an unrecognised format.
public static GetDimensions ( string path ) : Size
path string The path of the image to get the dimensions of.
리턴 System.Drawing.Size