### QPx_SetImporterFile

QPx_SetImporterFile(importerRef; imagePath):error
| importerRef | Longint | Reference to a graphics importer instance
| imagePath | Text | Full path name to image file
| error | Longint | Error result

Assigns an image file to a graphics importer instance.

The graphics importer instance is specified by importerRef. The image file to be assigned to the importer is specified by imagePath.

If the importer is associated with a BLOB or if importerRef does not refer to an existing importer instance, the qpx_paramErr error code is returned.

Note: QPx_SetImporterFile does not check if the specified file format is supported by the specified importer instance. You should check this yourself using, for example, the QPx_ValidateImporter command.

Example

``Assign an image file to the importer` `` `C_LONGINT($error)` `C_TEXT($imagePath)` `C_LONGINT(gQPixImporter)` `` `$imagePath:="Hard disk:images:croc.psd"` `` `$error:=QPx_SetImporterFile (gQPixImporter;$imagePath)` `` `If ($error#qpx_noErr)` ``Handle the error` `End if`

Related commands

QPx_NewImporter | Creates a graphics importer instance
QPx_NewImporterForFile | Creates a graphics importer instance for the image stored in a file
QPx_GetImporterFile | Returns the pathname of the file associated with a graphics importer

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:44:47