Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The command will write files and images from the Data Source in FROM to a file-path. For images it can resize, change the image format and change the aspect by exact fitting or cropping or smart fitting. It performs all of the same well known image manipulation functionality as the Media Server, and the syntax is identical. The command is introduced from Perfion2022 R1.

Properties

From

Input Data Source

If the input is a neutral Table-format the columns can be used to map fields to the files.

If the input is a binary stream, the input will be writhed to the file.

To

Optional. Specifies the root of a path. If specified, all filenames will be prefixed with the root-path value

Parameters

@File

The file name. The name can be dynamically named via the variables from the file information. See the method Perfion.WriteFile for more information.

@Par

Parameters to manipulate the images. See the method Perfion.WriteFile for more information.

@Encoding

Set the file encoding. If it is not set, it will use the default encoding UTF-8. It is possible to set encoding to: UTF-8, UTF-16 (Unicode), utf-16BE (Unicode Big-Endian), windows-1252 and other Code Page Names from Code Page Identifiers - Win32 apps (From Perfion 2023R1)

@IgnoreError

Ignore errors when writing files. If the saving failed the "Succeed" in the output will be False

Map

From

Name of Header, as it is named from Input-source.

To

  • Id refers to the Perfion Guid for a file or image. This value is used as a unique identifier for the file or image

  • File indicates the name of the file in the Data Source. It's important to note that this field can only use values from the Data Source and not variables from the file information, such as "@filename"

  • Par represents the parameters that are needed for the WriteFile operation. This field uses the same parameters as "@Par", but these parameters are taken from the Data Source.

It's worth mentioning that both "File" and "Par" fields can be mapped from the Input source instead of using the @parameters - see examples below

Script

Any Script code to execute for this header

Examples

Note the alternative use of File and @File as parameters below.

Example of WRITE.FILE command setup in Actions to save each image in imagetable. The file name uses the variables obtained directly from the images:

Example of WRITE.FILE command setup in Actions to save each image in imagetable. The file name use the value from the imagetable as the file name:

  • No labels