QPix Command Reference
![]() |
![]() ![]() |
QPx_NewImporterForData(importerRef; imageData; importerType):error | |||
![]() |
importerRef | Longint | Reference to a new graphics importer |
![]() |
imageData | BLOB | 4D BLOB containing image data |
![]() |
importerType | String4 | Importer type |
![]() |
error | Longint | Error result |
Creates a graphics importer instance for the image data stored in the specified BLOB and returns a reference. 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, this command creates an importer for image data stored in the 4D BLOB specified in imageData. In this case, QPix and QuickTime have no way for identifying the image type. You must, therefore, explicitly specify a type by passing its 4-character type identifier in the importerType parameter. For a list of available graphics importers, use QPx_GetImportTypes.
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 image data strored in a BLOB C_LONGINT($error) C_TEXT($imagePath) C_BLOB($imageData) C_LONGINT(gQPixImporter) $imagePath:="Hard disk:images:people.gif" DOCUMENT TO BLOB($imagePath;$imageData) $error:=QPx_NewImporterForData (gQPixImporter;$imageData;"GIFf") 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_GetImporterData | Returns the image data associated with a graphics importer |