Method

VipsRegionprepare_to

Declaration [src]

int
vips_region_prepare_to (
  VipsRegion* reg,
  VipsRegion* dest,
  const VipsRect* r,
  int x,
  int y
)

Description [src]

Like vips_region_prepare(): fill reg with the pixels in area r.

Unlike vips_region_prepare(), rather than writing the result to reg, the pixels are written into dest at offset x, y.

Also unlike vips_region_prepare(), dest is not set up for writing for you with vips_region_buffer(). You can point dest at anything, and pixels really will be written there. This makes vips_region_prepare_to() useful for making the ends of pipelines.

See also: vips_region_prepare(), vips_sink_disc().

Parameters

dest VipsRegion
 

Region to write to.

 The data is owned by the caller of the function.
r VipsRect
 

VipsRect of pixels you need to be able to address.

 The data is owned by the caller of the function.
x int
 

Postion of r in dest.

y int
 

Postion of r in dest.

Return value

Returns: int
 

0 on success, or -1 on error.