---
name: "im_iocheck"
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_iocheck"
---

# im\_iocheck(3)

checks image descriptors for WIO

## NAME

im\_incheck, im\_outcheck, im\_iocheck - checks image descriptors  for WIO

## SYNOPSIS

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

int im\_incheck( in )\
 IMAGE \*in;

int im\_outcheck( out )\
 IMAGE \*out;

**int im\_iocheck( in, out)**\
 **IMAGE \*in, \*out;**

## DESCRIPTION

[im\_incheck(3)](/im_incheck/3.md) checks that an image descriptor is suitable for WIO input (ie. all of its pels can be found from im-\>data). If possible, it transforms the descriptor to make WIO input ok using the following rules:

IM\_PARTIAL: the descriptor is magically turned into an IM\_SETBUF descriptor. Memory is allocated and the image generated into that. The old partial callbacks are closed down, and the descriptor reformed as a IM\_SETBUF.

IM\_OPENOUT: if the descriptor has been written to, it is automatically \`rewound,\` that is, it is closed and reopened as an IM\_MMAPIN descriptor.

IM\_SETBUF: just checks that the descriptor has been written to.

See the manual page for [im\_setupout(3)](/im_setupout/3.md) for a skeleton program.

[im\_outcheck(3)](/im_outcheck/3.md) checks that a descriptor is suitable for WIO output with [im\_writeline(3)](/im_writeline/3.md). If it sees an IM\_PARTIAL image, it turns it magically into an IM\_SETBUF image.

[im\_iocheck(3)](/im_iocheck/3.md) simply calls in\_incheck(3) for image in and [im\_outcheck(3)](/im_outcheck/3.md) for image out.

## RETURN VALUE

All functions returns 0 on success and -1 on error.

## SEE ALSO

[im\_open(3)](/im_open/3.md), [im\_cp\_desc(3)](/im_cp_desc/3.md), [im\_setupout(3)](/im_setupout/3.md), [im\_makerw(3)](/im_makerw/3.md).

## COPYRIGHT

National Gallery

## AUTHOR

J. Cupitt - 23/7/93
