CNSImage_Export
- Description
This function allows you to save an image to any folder with any name. You can also export an image using a dialog. The function will return text indicating the success or failure of the operation.
- Return Type
- Text
- Format
- CNSImage_Export ( Image ; Path ; Prompt ; AllowConvert ; TypeList )
- Required Parameters
- Image
A Container field that contains an Image you want to Export.
- Image
- Optional Parameters
- Path
The Path and File Name the Image will be Exported to. (Specify "" or only a path to display Save File Dialog).
- Prompt
A message to display in the Save File Dialog.
- AllowConvert
If True, this allows the end user to select an alternate File Type to Convert to on Export. (Only available if the Save File Dialog is displayed.)
- TypeList
A return-delimited list of Image File Types the end user is Allowed to Convert to. (Valid Types are: JPEG, GIF, PNG, BMP, PICT, TIFF, PSD, SGI, TGA, PDF. Only available if the Save File Dialog is displayed.)
- Path
- Related Items
- CNSImage_File_Copy, CNSImage_File_Delete, CNSImage_File_Exists, CNSImage_File_GetPath, CNSImage_File_SelectFileWithDialog, CNSImage_File_SelectFolderWithDialog, CNSImage_Import, Reference: Paths
- Examples
Example 1
Code:
CNSImage_Export( Image )Result:
Displays a save file dialog. You can edit the name of the file and navigate in the file dialog prior to saving.Example 2
Code:
CNSImage_Export( Image ;"/Volume/folder/filename.jpg")Result:
Saves an image to the folder "/Volume/folder/" with the name "filename.jpg".Example 3
Code:
CNSImage_Export( Image ;"/Volume/folder/")Result:
Displays a save file dialog starting in the folder "/Volume/folder/". You can edit the name of the file in the file dialog prior to saving.Example 4
Code:
CNSImage_Export( Image ;"";"Please locate where you would like to save this image.")Result:
Displays a save file dialog with the prompt: "Please locate where you would like to save this image." You can edit the name of the file in the file dialog prior to saving.Example 5
Code:
CNSImage_Export( Image ;"/Volume/folder/";""; True )Result:
Displays a save file dialog starting in the folder "/Volume/folder/". You can edit the name of the file in the file dialog prior to saving and specify a different image format for the file to convert the image if you want.