QPx_NewImporterForData(importerRef; importerRef; importerRef):error
importerRef Longint Reference to a new graphics importer
imageData BLOB 4D BLOB containing image data
importerType Text Importer type
error Longint Error result

Create a graphics importer instance for the image data stored in a BLOB

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. Therefore, you must 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. 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 image data strored in a BLOB


$imagePath:="Hard disk:images:people.gif"
DOCUMENT TO BLOB($imagePath;$imageData)

$error:=QPx_NewImporterForData (gQPixImporter;$imageData;qpx_GIFFile)

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_GetImporterData Get the image data associated with a graphics importer