QPx_NewImporter(importerRef; importerRef):error
importerRef Longint Reference to a new graphics importer
importerType Text Importer type
error Longint Error result

Create a graphics importer instance without image data

Unlike QPx_NewImporterForFile and QPx_NewImporterForData, this command creates a graphics importer instance that is not initially associated with any image data source. You can later specify the image data source by calling QPx_SetImporterFile or QPx_SetImporterData.

You must explicitly specify an importer type by passing a 4-character type identifier in the importerType parameter. For a list of all available graphics importers, use the QPx_GetImportTypes command.

A reference to the importer is returned in importerRef. This reference can be used with all QPix commands in this group to refer to the graphics importer instance and its associated data.

NOTE When done working with an importer instance, you must destroy it by calling QPx_FreeImporter (unless you have assigned the importer to a QPix area, in which case its destruction will be handled by the area).


   // Create an importer for handling Photoshop images


$error:=QPx_NewImporter (gQPixImporter;qpx_PhotoshopFile)

If ($error=qpx_noErr)
      // Importer created successfully
End if 

Related commands

QPx_GetImportTypes Get the list of available importers
QPx_SetImporterData Assign image data from a BLOB to a graphics importer
QPx_SetImporterFile Assign an image file to a graphics importer