Product Logo

CNS Image

Import, edit, and export Images in the FileMaker environment

Functions

CNSImage_Export

NameCNSImage_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 TypeText
FormatCNSImage_Export ( Image ; Path ; Prompt ; AllowConvert ; TypeList )
Required Parameters
Image

A Container field that contains an Image you want to Export.

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.)

Examples
Example 1

Displays a save file dialog. You can edit the name of the file and navigate in the file dialog prior to saving.

CNSImage_Export( Image )
Example 2

Saves an image to the folder "/Volume/folder/" with the name "filename.jpg".

CNSImage_Export( Image ; "/Volume/folder/filename.jpg" )
Example 3

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.

CNSImage_Export( Image ; "/Volume/folder/" )
Example 4

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.

CNSImage_Export( Image ; "" ; "Please locate where you would like to save this image." )
Example 5

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.

CNSImage_Export( Image ; "/Volume/folder/" ; "" ; True )