Media Server 12.13

# GetFaceImage

Returns a training image associated with a face.

Type: synchronous

Parameter | Description | Required
--- | --- | ---
`database` | The name of the database that contains the face. | Yes
`format` | The image format to use for the returned image. `bmp` `gif` `jpeg` `pdf` `png` `ppm` `tiff` `webp` If you do not specify a format, but specify a file name with the `FileName` parameter, Media Server returns the image in a format that matches the file extension. If you do not specify a format or a file name, the image is returned in its original format. | No
`identifier` | The identifier of the face from which you want to retrieve an image. | Yes
`imagelabel` | The label of the image that you want to retrieve. | Yes
`imagesize` | The maximum dimensions to use for the returned image, in pixels, width followed by height. If you set the width and height, for example `200x300`, Media Server returns the largest image that fits within the specified size and maintains the original aspect ratio. To specify a maximum width or maximum height, specify that dimension and set the other to zero. For example, `250x0` always returns an image 250 pixels wide. If you do not specify a size, Media Server returns the image at its original size. | No

You can also set the parameters Output and FileName to write the output of this action to a file.

## Example

    curl http://localhost:14000/action=getfaceimage
                                -F database=BritishPoliticians
                                -F identifier=6600dc0f9dd72d0cb55589e8f1d28b62
                                -F imagelabel=image1
                                -o ReturnedFaceImage.jpg

## Response

The response contains the image data.

Media Server identifies the image type and sets the `Content-Type` header to the appropriate MIME type. The `Content-Length` header is set to the length of the image data in bytes.

If an error occurs, Media Server returns a standard XML error response.

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Media Server 12.13

Topic Title: GetFaceImage