---
name: "im_tile_cache"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_tile_cache"
---

# im\_tile\_cache(3)

cache an image, tilewise

## NAME

im\_tile\_cache - cache an image, tilewise

## SYNOPSIS

\#include \<vips/vips.h\>

int\
 im\_tile\_cache( IMAGE \*in, IMAGE \*out,\
\
 	int tile\_width, int tile\_height, int max\_tiles );

## DESCRIPTION

**tile\_cache(3)** behaves rather like  **[im\_copy(3)](/im_copy/3.md)** between images **in** and  **out,** except that it keeps a cache of computed pixels. This cache is made of up to **max\_tiles** tiles (a value of -1 for **max** means any number of tiles), and each tile is of size **tile\_width** by **tile\_height** pixels. Each cache tile is made with a single call to  **[im\_prepare(3)](/im_prepare/3.md).**

This is a lower-level operation than **[im\_cache(3)](/im_cache/3.md)** since it does no subdivision. It is suitable for caching the output of operations like **[im\_exr2vips(3)](/im_exr2vips/3.md)** on tiled images.

## RETURN VALUE

The function returns 0 on success, and non-zero on error, setting im\_error().

## SEE ALSO

[im\_prepare(3)](/im_prepare/3.md)

## AUTHOR

J Cupitt, 2006
