QPix Command Reference
![]() |
![]() ![]() |
QPx_NewImporter(importerRef; importerType):error | |||
![]() |
importerRef | Longint | Reference to a new graphics importer |
![]() |
importerType | String4 | Importer type |
![]() |
error | Longint | Error result |
Creates a graphics importer and returns a reference to it. This reference can be used with all QPix commands in this group to refer to this graphics importer instance and its associated 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.
Note: After you have finished working with an importer instance, you should destroy it by calling QPx_FreeImporter.
Example
`Create an importer for handling Photoshop images C_LONGINT($error) C_LONGINT(gQPixImporter) $error:=QPx_NewImporter (gQPixImporter;"8BPM") If ($error=qpx_noErr) `Importer created successfully End if |
Related commands
QPx_GetImportTypes | Returns the list of available import types |
QPx_SetImporterData | Assigns the image data contained in a BLOB to a graphics importer |
QPx_SetImporterFile | Assigns an image file to a graphics importer |