Vips.Image.linecache (original) (raw)
Method
VipsImagelinecache
Declaration [src]
int
vips_linecache (
VipsImage* in,
VipsImage** out,
...
)
Description [src]
This operation behaves rather like vips_copy() between imagesin and out, except that it keeps a cache of computed scanlines.
The number of lines cached is enough for a small amount of non-local access.
Each cache tile is made with a single call to vips_region_prepare().
When the cache fills, a tile is chosen for reuse. If access isVIPS_ACCESS_RANDOM, then the least-recently-used tile is reused. Ifaccess is VIPS_ACCESS_SEQUENTIAL, then the top-most tile is reused. access defaults to VIPS_ACCESS_RANDOM.
tile_height can be used to set the size of the strips thatvips_linecache() uses. The default is 1 (a single scanline).
Normally, only a single thread at once is allowed to calculate tiles. If you set threaded to TRUE, vips_linecache() will allow many threads to calculate tiles at once and share the cache between them.
Optional arguments
access: VipsAccess, hint expected access patterntile_height:gint, height of tiles in cachethreaded:gboolean, allow many threads
This method is not directly available to language bindings.
Parameters
out
Type: VipsImage
Output image.
| The argument will be set by the function. |
|---|
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
...
Type: ``
NULL-terminated list of optional named arguments.
Return value
Type: int
0 on success, -1 on error.