Reference > Functions reference > Container functions > GetThumbnail
 

GetThumbnail

Returns a thumbnail image of the content in a container field, according to a specified height and width.

Format 

GetThumbnail(field;width;height)

Parameters 

field - any text, number, date, time, timestamp, or container field; or any text expression or numeric expression.

width - the width for the thumbnail.

height - the height for the thumbnail.

Data type returned 

container

Originated in 

FileMaker Pro 12.0

Description 

Returns an image that’s stored in a container field according to specified values for width and height. The thumbnail image always maintains the proportions of the original image and has a resolution of 72 dpi. Thumbnails cannot be made larger than the image’s original size.

Notes 

This function returns a thumbnail image only if the Generate and store thumbnails for images option is selected in the Manage Containers dialog box. If this option is deselected, the image is returned at its original size. See Managing performance with thumbnails.

If the field parameter does not specify a field that contains image data, field must evaluate to the file path of an image. See Creating file paths.

Example 1 

Exports a thumbnail with a maximum height and width of 50 points.

Set Field [Invoices::ExportContainer ; GetThumbnail ( Invoices::Container ; 50 ; 50 )
Export Field Contents [Invoices::ExportContainer ; Create directories: Off]

Example 2 

Creates a thumbnail, exports it, and attaches it to an email.

Set Field [Invoices::ExportContainer; GetThumbnail ( Invoices::Container ; 50 ; 50 )
Set Variable [$ATTACHMENT; Value:Get ( TemporaryPath ) & GetContainerAttribute ( Invoices::ExportContainer ; "filename" )]
Export Field Contents [Invoices::ExportContainer; "$ATTACHMENT" ; Create directories: Off]
Send Mail [Send via E-mail Client; With dialog: Off; To: Customers::Email; "$ATTACHMENT"]

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas