QPx_ReadImageFileInPicture

QPx_ReadImageFileInPicture(imagePath; imagePath):error
imagePath Text Full path to image file
imagePict Picture 4D picture variable
error Longint Error result

Read an image file into a 4D picture variable

The image file is specified by imagePath. If the path points to a valid image file, the latter will be converted to a 4D picture (new picture format) and returned in the imagePict parameter.

If imagePath is empty, QPix presents a file selection dialog where the user can preview and select an image file. If the user selects a file, its full pathname is returned in imagePath, otherwise error qpx_userCancelErr is returned.

Example

   // Get an image into a 4D picture
   // The user is asked for the image file

C_LONGINT($error)
C_TEXT($imagePath)
C_PICTURE($pict)

$imagePath:=""// This will bring up the file selection dialog

$error:=QPx_ReadImageFileInPicture ($imagePath;$pict)

If ($error#qpx_noErr)
   
      //Handle the error
   
End if