Vips.Region.prepare (original) (raw)

Vips

API Version: 8.0

Library Version: 8.18

Type

Region

Methods

black buffer copy equalsregion fetch height image invalidate paint paint_pel position prepare prepare_to region shrink shrink_method width

Generated by gi-docgen 2025.3

Method

VipsRegionprepare

Declaration [src]


int
vips_region_prepare (
  VipsRegion* reg,
  const VipsRect* r
)

Description [src]

vips_region_prepare() fills reg with pixels. After calling, you can address at least the area r with VIPS_REGION_ADDR() and get valid pixels.

vips_region_prepare() runs in-line, that is, computation is done by the calling thread, no new threads are involved, and computation blocks until the pixels are ready.

Use vips_sink_screen() to calculate an area of pixels in the background.

See also

vips_sink_screen(), vips_region_prepare_to().

Parameters

r

Type: VipsRect

VipsRect of pixels you need to be able to address.

The data is owned by the caller of the method.

Return value

Type: int

0 on success, or -1 on error.