SECImage::ParseImage

Creates an SECImage object from the specified file and returns it.

Defined in: SECIMLD.CPP

Syntax

static SECImage* ParseImage(LPCTSTR lpszPathName);

static SECImage* ParseImage(CFile* pFile);

Return Value

If successful, returns a pointer to the newly created SECImage object; NULL otherwise.

Parameters

lpszPathName

Filename to load image from.

pFile

File to load image from.

Comments

This static utility function creates an SECImage object from the specified file and returns it.

The version that takes the a file name (LPCTSTR) will first verify if the extension of the specified file matches any of the known extensions of the supported formats and if so creates the appropriate SECImage derivative, calls LoadImage on it and returns the SECImage object.

If the file extension is not known or if LoadImage failed in the previous step then it loads the file into a CFile and calls the second version.

The version that takes the CFile pointer will parse through all the supported SECImage derived classes, calling LoadImage with the pFile. As soon as LoadImage succedes it returns the corresponding SECImage.

Note that in both the above cases the LoadImage test will be performed on only those image formats that are currently selected in the build config. By default all formats are selected.

See Also

SECImageLoadImage