C# 클래스 NContrib.Drawing.ImageTypeHelper

파일 보기 프로젝트 열기: veracross/ncontrib 1 사용 예제들

공개 메소드들

메소드 설명
GetImageEncoderFromMimeType ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo

Gets the appropriate ImageCodecInfo based on a mime type

GetImageFormatFromMimeType ( string mimeType ) : ImageFormat

Get the appropriate ImageFormat for the specified mimeType using GetImageEncoderFromMimeType as a helper.

IsBmp ( Stream stream ) : bool

Looks for the BMP 2-byte leading signature at the current position in the stream. Rewinds the stream to its original position when finished.

IsGif ( Stream stream ) : bool

Looks for the GIF 6-byte leading signature and version the current position in the stream. Rewinds the stream to its original position when finished.

IsImageType ( Stream stream, ImageFormat type ) : bool

Detects if the image in the given stream is

IsJpeg ( Stream stream ) : bool

Looks for the JPEG 2-bytes leading signature at the current position in the stream Rewinds the stream to its original position when finished.

IsPng ( Stream stream ) : bool

Looks for the PNG 8-byte leading signature at the current position in the stream. Rewinds the stream to its original position when finished.

메소드 상세

GetImageEncoderFromMimeType() 공개 정적인 메소드

Gets the appropriate ImageCodecInfo based on a mime type
public static GetImageEncoderFromMimeType ( string mimeType ) : System.Drawing.Imaging.ImageCodecInfo
mimeType string
리턴 System.Drawing.Imaging.ImageCodecInfo

GetImageFormatFromMimeType() 공개 정적인 메소드

Get the appropriate ImageFormat for the specified mimeType using GetImageEncoderFromMimeType as a helper.
public static GetImageFormatFromMimeType ( string mimeType ) : ImageFormat
mimeType string
리턴 System.Drawing.Imaging.ImageFormat

IsBmp() 공개 정적인 메소드

Looks for the BMP 2-byte leading signature at the current position in the stream. Rewinds the stream to its original position when finished.
public static IsBmp ( Stream stream ) : bool
stream Stream
리턴 bool

IsGif() 공개 정적인 메소드

Looks for the GIF 6-byte leading signature and version the current position in the stream. Rewinds the stream to its original position when finished.
public static IsGif ( Stream stream ) : bool
stream Stream
리턴 bool

IsImageType() 공개 정적인 메소드

Detects if the image in the given stream is
public static IsImageType ( Stream stream, ImageFormat type ) : bool
stream Stream
type System.Drawing.Imaging.ImageFormat
리턴 bool

IsJpeg() 공개 정적인 메소드

Looks for the JPEG 2-bytes leading signature at the current position in the stream Rewinds the stream to its original position when finished.
public static IsJpeg ( Stream stream ) : bool
stream Stream
리턴 bool

IsPng() 공개 정적인 메소드

Looks for the PNG 8-byte leading signature at the current position in the stream. Rewinds the stream to its original position when finished.
public static IsPng ( Stream stream ) : bool
stream Stream
리턴 bool