---
name: "im_writeline"
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_writeline"
---

# im\_writeline(3)

writes a line of data in the image descriptor

## NAME

im\_writeline - writes a line of data in the image descriptor

## SYNOPSIS

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

**int im\_writeline(ypos, image, buffer)**\
 **int ypos;**\
 **IMAGE \*image;**\
 **char \*buffer;**

## DESCRIPTION

**[im\_writeline(3)](/im_writeline/3.md)** writes the ypos line of an image held in buffer to either the output buffer image (previously set by [im\_setbuf(3)](/im_setbuf/3.md)) or to an output file (previously set by im\_openput(3)).  The function provides uniform treatment of  output irrespectively whether it is a file or a buffer image.

You should be careful that the buffer does indeed contain enough data for a complete line of pels --- see lsize(3).

Any evaluation callbacks which have been added to image are triggered --- see [im\_generate(3)](/im_generate/3.md) and [im\_add\_eval\_callback(3)](/im_add_eval_callback/3.md).

## BUGS

This function changed in VIPS6:  programs written previously must be modified by removing the last argument of the old [im\_writeline(3)](/im_writeline/3.md).

## RETURN VALUE

The function returns 0 on success and -1 on error.

## SEE ALSO

[im\_setbuf(3)](/im_setbuf/3.md), [im\_openout(3)](/im_openout/3.md), [im\_add\_eval\_callback(3)](/im_add_eval_callback/3.md).

## COPYRIGHT

N. Dessipris

## AUTHOR

N. Dessipris 23/04/1991
