---
name: "im_binfile"
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_binfile"
---

# im\_binfile(3)

wrap a raw binary file inside an IMAGE descriptor

## NAME

im\_binfile, im\_image - wrap a raw binary file inside an IMAGE descriptor

## SYNOPSIS

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

IMAGE \*im\_binfile( name, xs, ys, b, off )\
 char \*in;\
 IMAGE \*out;\
 int xs, ys, b, off;

IMAGE \*\
 im\_image( void \*buffer, int width, int height, int bands, int format )

## DESCRIPTION

**[im\_binfile(3)](/im_binfile/3.md)** maps the file named, and returns an image descriptor which looks very like the sort of thing that  **[im\_mmapin(3)](/im_mmapin/3.md)** returns.

The parameters specify the image width, height, number of bands and offset in bytes from the start of the file.

**[im\_image(3)](/im_image/3.md)** makes an IMAGE deriptor from an area of pixels in memory. The memory buffer will not be freed when the IMAGE is closed, use  **im\_add\_close\_callback()** if you want this.

## RETURN VALUE

The functions return NULL on error.

## SEE ALSO

[im\_mmapin(3)](/im_mmapin/3.md), [im\_openout(3)](/im_openout/3.md), [im\_setbuf(3)](/im_setbuf/3.md).

## COPYRIGHT

N. Dessipris

## AUTHOR

N. Dessipris - 11/04/1990
