Method: Perfion.UpdateBinaryMetadata( … )

Will update selected Perfion binary metadata. Returns success status.

Syntax

bool Perfion.UpdateBinaryMetadata( string id = "", string type = "", string value = "" )

All the parameters to this method are optional. Therefore it is recommend to include them by name, as shown in the examples below. The behavior of each parameter is described in the following table.

Method Parameters

string
id

The unique Perfion binary ID (GUID) of a file or image, or a ';' separated list of multiple IDs, specifying which files or images to update. Default: Will take the Value of the current Map-entry. So if used on a Map-entry that contains valid IDs you do not need to specify this parameter.
Note that Perfion binary metadata which can be updated is only relevant to binaries of image type.

 

string
type

Binary metadata type.
Supported values:

 

 

poi

Image Point-of-Interest

string
value

Specifies the value of binary metadata based on its type. One can provide multiple values separated by ';' which should match the amount of Perfion IDs provided in 'id' argument.

Value based on type:

 

 

poi

Image Point-of-Interest (POI) value. Format: <X>x<Y>, where X and Y are image POI values for horizontal and vertical image axes expressed in %.
The values are relative to the top left image corner which would be equivalent to POI value 0x0. The bottom right image corner would represent the POI value 100x100. By default images in Perfion do not have POI value which is equivalent to POI value set to the center of the image, e.g. value = 50x50.

Example 1

Script example updates a single Perfion image metadata specified using binary ID and POI value.

var status = Perfion.UpdateBinaryMetadata( id: "3c2f8d0b-0f6e-45c1-a1f9-1017e169a0b4", type: "poi", value: "15x25" );

Example 2

Script example updates 2 Perfion images with metadata specified using ';' separated binary IDs and POI values.

var status = Perfion.UpdateBinaryMetadata( id: "3c2f8d0b-0f6e-45c1-a1f9-1017e169a0b4";"3c2f8d0b-0f6e-45c1-a1f9-1017e169a0b5", type: "poi", value: "15x25;25x35" );