BE_ConvertContainer

BE_ConvertContainer(field;{ type})



This is to convert container field contents between the internal FileMaker "image" format and the internal "file" format. So you can do insert file, but then convert that to an image that will display instead of just seeing the file icon.


Parameters:

- field : a container field with a file or image in it.

- type : either blank for a type of "file" or from the list below.

Keywords:

Container Convert


Version History:

- 3.1 :

- 4.2 : Removed the width and height parameters, the plugin now performs this natively.

Notes:

- This is not an image format conversion function, nor does it resize images. It only converts between the two container formats, of file and image. So you can't use it to change the format of the contents of an email from PDF to JPEG for example. When going from file to image, FileMaker needs to be told what sort of image it is, and that's what you need to pass in the parameters.

- If you need to resize a JPEG image file, you can use the BE_JPEGRecompress function.

- You would use this function when you have a image file storedin a containerthat is showing as a file, rather than a picture. You use this function to alter the internal storage option to image so that it will display a preview. The width and height parameters are to let FileMaker properly display the image, so you need to send it the actual size of the image ( you can send it other sizes, it won't resize the image, it just won't display properly, and may not appear properly in thumbnails, for example ).

- Use this function with a Set Field script step to convert from a container field stored as a file into a container image or vice versa. It can be used to set into the same field as the one referenced in the functionparameter.

1. If only the field is supplied then it is converted to “FILE”
2. If “ZLIB” is supplied the file is compressed
3. Other known formats are ( all four character codes - note the space after PDF ):

“snd “ *
“JPEG”
“GIFf" *
"EPS “ *
“META" *
"PNGf"
“BMPf" *
"PDF "

* = not tested.

Still need help? Contact Us Contact Us