### Function

# Gimp Channel get_by_id

unstable since: 3.0

#### Declaration [src]

    GimpChannel*
    gimp_channel_get_by_id (
      gint32 channel_id
    )

#### Description [src]

Returns a `GimpChannel` representing `channel_id`. This function calls `gimp_item_get_by_id()` and returns the item if it is channel or `NULL` otherwise.

Available since: 3.0

#### Parameters

`channel_id`

  Type: `gint32`

  The channel id.

#### Return value

Type: `GimpChannel`

A `GimpChannel` for `channel_id` or `NULL` if `channel_id` does not represent a valid channel. The object belongs to libgimp and you must not modify or unref it.

The data is owned by the called function.
The return value can be `NULL`.