### Function

# AppStreamCompose ImageTarget new

since: 1.2.0

#### Declaration [src]

    AscImageTarget*
    asc_image_target_new (
      const gchar* name,
      AscImageScaleMode scale_mode,
      gint width,
      gint height
    )

#### Description [src]

Create a new `AscImageTarget`. The image format the rendition is stored in is derived from the file extension of `name`.

`name` must be a single path segment: it is resolved relative to the output directory of the media operation, and must not contain any directory components or refer to a parent directory.

Available since: 1.2.0

#### Parameters

`name`

  Type: `const gchar*`

  Filename the rendition should be stored as.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`scale_mode`

  Type: `AscImageScaleMode`

  An `AscImageScaleMode`.

`width`

  Type: `gint`

  Target width (used depending on `scale_mode`).

`height`

  Type: `gint`

  Target height (used depending on `scale_mode`).

#### Return value

Type: `AscImageTarget`

An `AscImageTarget`.

The caller of the function takes ownership of the data, and is responsible for freeing it.