# Gimp.Brush.get_buffer

    @accepts(Gimp.Brush, int, int, Babl.Object)
    @returns(Gegl.Buffer)
    def get_buffer(self, max_width, max_height, format):
        # Python wrapper for gimp_brush_get_buffer()

Gets pixel data of the brush within the bounding box specified by max_width and max_height. The data will be scaled down so that it fits within this size without changing its ratio. If the brush is smaller than this size to begin with, it will not be scaled up.

If max_width or max_height are None, the buffer is returned in the brush's native size.

When the brush is parametric or a raster mask, only the mask (as returned by [method@Gimp.Brush.get_mask]) will be set. The returned buffer will be NULL.

Make sure you called [func@Gegl.init] before calling any function using `GEGL`.

self

  a [class@Brush].

max_width

  a maximum width for the returned buffer.

max_height

  a maximum height for the returned buffer.

format

  an optional Babl format.

Returns