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

filePath
The file path containing the file extension from which to calculate the image format (e.g. "c:\temp\myimage.jpg").
Initializes a new instance of the FormatEncoderParams class by determining the image format from the file extension of the provided file path; if the file extension is unknown then the default image format is used (CoreSettings.ImageArchiver.DefaultImageFormatId).

Syntax

Visual Basic (Declaration)  
Public Overloads Shared Function GetFormatEncoderParamsFromFilePath( _
   ByVal filePath As String _
) As FormatEncoderParams
C#  
public static FormatEncoderParams GetFormatEncoderParamsFromFilePath( 
   string filePath
)

Parameters

filePath
The file path containing the file extension from which to calculate the image format (e.g. "c:\temp\myimage.jpg").

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.