C# Class ImageProcessor.Imaging.Formats.FormatUtilities

Utility methods for working with supported image formats.
ファイルを表示 Open project: JimBobSquarePants/ImageProcessor

Public Methods

Method Description
CreatePropertyItem ( ) : System.Drawing.Imaging.PropertyItem

Uses reflection to allow the creation of an instance of PropertyItem.

GetEncodingParameters ( int quality ) : System.Drawing.Imaging.EncoderParameters

Returns an instance of EncodingParameters for jpeg compression.

GetFormat ( Stream stream ) : ISupportedImageFormat

Gets the correct ISupportedImageFormat from the given stream.

HasAlpha ( Image image ) : bool

Returns a value indicating whether the given image has an alpha channel.

IsAnimated ( Image image ) : bool

Returns a value indicating whether the given image is animated.

IsIndexed ( Image image ) : bool

Returns a value indicating whether the given image is indexed.

Method Details

CreatePropertyItem() public static method

Uses reflection to allow the creation of an instance of PropertyItem.
public static CreatePropertyItem ( ) : System.Drawing.Imaging.PropertyItem
return System.Drawing.Imaging.PropertyItem

GetEncodingParameters() public static method

Returns an instance of EncodingParameters for jpeg compression.
public static GetEncodingParameters ( int quality ) : System.Drawing.Imaging.EncoderParameters
quality int The quality to return the image at.
return System.Drawing.Imaging.EncoderParameters

GetFormat() public static method

Gets the correct ISupportedImageFormat from the given stream.
public static GetFormat ( Stream stream ) : ISupportedImageFormat
stream Stream /// The to read from. ///
return ISupportedImageFormat

HasAlpha() public static method

Returns a value indicating whether the given image has an alpha channel.
public static HasAlpha ( Image image ) : bool
image Image /// The to test. ///
return bool

IsAnimated() public static method

Returns a value indicating whether the given image is animated.
public static IsAnimated ( Image image ) : bool
image Image /// The to test. ///
return bool

IsIndexed() public static method

Returns a value indicating whether the given image is indexed.
public static IsIndexed ( Image image ) : bool
image Image /// The to test. ///
return bool