C# Class ImageProcessor.Imaging.Formats.FormatUtilities

Utility methods for working with supported image formats.
Afficher le fichier Open project: JimBobSquarePants/ImageProcessor

Méthodes publiques

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

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

GetEncodingParameters() public static méthode

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.
Résultat System.Drawing.Imaging.EncoderParameters

GetFormat() public static méthode

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

HasAlpha() public static méthode

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

IsAnimated() public static méthode

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

IsIndexed() public static méthode

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