QPx_ValidateImporter
QPx_ValidateImporter(importerRef; importerRef):error | |||
---|---|---|---|
![]() |
importerRef | Longint | Reference to a graphics importer instance |
![]() |
validFlag | Longint | Validation result |
![]() |
error | Longint | Error result |
Ask importer to test its image data
Calls a graphics importer instance to check if its associated image source (file or BLOB) contains valid image data.
The graphics importer instance is specified by importerRef. If importerRef does not refer to an existing graphics importer instance, the qpx_paramErr error code is returned.
The result of validation is returned in the validFlag parameter. A value of 0 means that the data is invalid; valid data return a value of 1.
ATTENTION Not all importers implement this call. If the specified importer does not, this command will return the qpx_badCompSel error. This doesn't mean that the image data are valid – or that they are not.
Example
// Validate the importer C_LONGINT($error) C_LONGINT($valid) C_LONGINT(gQPixImporter) $error:=QPx_ValidateImporter (gQPixImporter;$valid) Case of : ($error=qpx_noErr) // $valid contains 0 or 1 : ($error=qpx_badCompSel) //Importer does not support validation Else // Handle the error End case
Related commands
QPx_SetImporterFile | Assign an image file to a graphics importer |