CodeCarvings.Piczard
GetFormatEncoderParamsFromFileExtension(String,Guid) Method
See Also  Send Feedback
CodeCarvings.Piczard Namespace > ImageArchiver Class > GetFormatEncoderParamsFromFileExtension Method : GetFormatEncoderParamsFromFileExtension(String,Guid) Method

fileExtension
The file extension from which to calculate the image format (e.g. ".jpeg" or ".jpg").
defaultImageFormatId
The Guid of the image format to use if the provided file extension is unknown.
Initializes a new instance of the FormatEncoderParams class by determining the image format from the file extension; if the file extension is unknown then the provided default image format Guid is used.

Syntax

Visual Basic (Declaration)  
Public Overloads Shared Function GetFormatEncoderParamsFromFileExtension( _
   ByVal fileExtension As String, _
   ByVal defaultImageFormatId As Guid _
) As FormatEncoderParams
C#  
public static FormatEncoderParams GetFormatEncoderParamsFromFileExtension( 
   string fileExtension,
   Guid defaultImageFormatId
)

Parameters

fileExtension
The file extension from which to calculate the image format (e.g. ".jpeg" or ".jpg").
defaultImageFormatId
The Guid of the image format to use if the provided file extension is unknown.

Return Value

An instance of a specific FormatEncoderParams class if it's available (e.g. JpegFormatEncoderParams for the Jpeg format); otherwise an instance of the GenericFormatEncoderParams class.

Requirements

Platforms: Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows 2000 - Windows Server family: 2012, 2008.R2, 2008, 2003, 2000

See Also

©2013 Sergio Turolla. All Rights Reserved.