### Method

# Gegl Buffer sampler_new

#### Declaration [src]

    GeglSampler*
    gegl_buffer_sampler_new (
      GeglBuffer* buffer,
      const Babl* format,
      GeglSamplerType sampler_type
    )

#### Description [src]

Create a new sampler, when you are done with the sampler, g_object_unref it.

Samplers only hold weak references to buffers, so if its buffer is freed the sampler will become invalid.

This method is not directly available to language bindings.

#### Parameters

`format`

  Type: `Babl`

  Format we want data back in.

  The data is owned by the caller of the method.

`sampler_type`

  Type: `GeglSamplerType`

  The sampler type to use, to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST, GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC, GEGL_SAMPLER_NOHALO and GEGL_SAMPLER_LOHALO.

#### Return value

Type: `GeglSampler`

No description available.

The returned data is owned by the instance.