### Method

# Gimp Drawable get_pixel

#### Declaration [src]

    guint8*
    gimp_drawable_get_pixel (
      GimpDrawable* drawable,
      gint x_coord,
      gint y_coord,
      gint* num_channels
    )

#### Description [src]

Gets the value of the pixel at the specified coordinates.

This procedure gets the pixel value at the specified coordinates. The ‘num_channels’ argument must always be equal to the bytes-per-pixel value for the specified drawable.

#### Parameters

`x_coord` | `gint`
| The x coordinate.
`y_coord` | `gint`
| The y coordinate.
`num_channels` | `gint*`
| The number of channels for the pixel.
| The argument will be set by the function.

#### Return value

Returns: | An array of `guint8`

         The pixel value.
         The returned value must be freed with g_free().

| The length of the array is in the `num_channels` argument.
| The caller of the method takes ownership of the data, and is responsible for freeing it.