---
name: "im_initdesc"
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_initdesc"
---

# im\_initdesc(3)

initialises an image descriptor to specific values

## NAME

im\_initdesc - initialises an image descriptor to specific values

## SYNOPSIS

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

void im\_initdesc( IMAGE \*image,\
      int xsize, int ysize,\
      int bands, int bandbits, int bandfmt,\
      int coding, int type,\
      float xres, float yres,\
      float xo, float yo )

## DESCRIPTION

**[im\_initdesc(3)](/im_initdesc/3.md)** initialises the image descriptor according to the entered values. More specifically the Xsize, Ysize, Bands, BandFmt, Coding, Type, Xres, Yres, Xoffset and Yoffset members of the descriptor are initialised by the correspondingly entered arguments. The members  fd, baseaddr, data and  filename are not handled by this function.  The order of the args is the same as in vips/vips.h.

The **bandbits** parameter is deprecated and ignored by this function: you can always pass zero.

Example: make a 512 by 512 one-band memory buffer.

   if( !(im = im\_open( "temp", "t" )) )\
         /\* Error ...\
    im\_initdesc( im,\
        512, 512,\
        1, 0, FMTUCHAR,\
        NOCODING, B\_W,\
        1\.0, 1.0,\
        0, 0 );\
    if( im\_setupout( im ) )\
        /\* Error ...

## ALSO

[im\_open(3)](/im_open/3.md), [im\_setupout(3)](/im_setupout/3.md).

## COPYRIGHT

N. Dessipris

## AUTHOR

N. Dessipris - 22/04/1991
