<- Back to CNS Image function list
CNSImage_Import
- Description
The CNSImage_Import function allows you to easily import images into FileMaker. You can import by specifying a path to an image as well as using a dialog box to navigate to a desired image.
- Return Type
- Container
- Format
- CNSImage_Import ( Path ; TypeList ; Prompt )
- Optional Parameters
- Path
The Path and File Name of the Image to Import. (Specify "" or only a Path to display Open File Dialog).
- TypeList
A return-delimited list of Image File Types the user is allowed to Import. Types include: "JPEG", "GIF", "PNG", "BMP", "PICT", "TIFF", "PSD", "SGI", "TGA", "MAC", and "PDF".
- Prompt
A message to be displayed in the Open File Dialog.
- Path
- Related Items
- CNSImage_Export, CNSImage_File_Copy, CNSImage_File_Delete, CNSImage_File_Exists, CNSImage_File_GetPath, CNSImage_File_SelectFileWithDialog, Reference: Image Types, Reference: Paths
- Examples
Example 1
Code:
CNSImage_ImportResult:
A dialog is shown to choose an image.Example 2
Code:
CNSImage_Import("/volume/folder/")Result:
A dialog is shown to choose a file starting at the folder "/volume/folder/"Example 3
Code:
CNSImage_Import("";"JPG¶PNG")Result:
A dialog is shown to choose a file limited to JPG and PNG image types.Example 4
Code:
CNSImage_Import("";"JPG";"Please choose a JPG image:")Result:
A dialog is shown to choose a file limited to JPG images with the prompt: "Please choose a JPG image:".Example 5
Code:
CNSImage_Import("";"";"Choose any image....")Result:
A dialog is shown to choose any type of image with the prompt: "Choose any image...".