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

Assign an image file to a graphics importer

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 is returned.

NOTE The command does not check whether the specified file format is supported by the specified importer instance. You should check this yourself using the QPx_ValidateImporter command.


   // Assign an image file to the importer


$imagePath:="Hard disk:images:croc.psd"

$error:=QPx_SetImporterFile (gQPixImporter;$imagePath)

If ($error#qpx_noErr)
      // Handle the error
End if 

Related commands

QPx_NewImporter Create a graphics importer instance without image data
QPx_NewImporterForFile Create a graphics importer instance for the image stored in a file
QPx_GetImporterFile Get the path of the file associated with a graphics importer