---
name: "im_fgrey"
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_grey"
---

# im\_fgrey(3)

creates a grey scale

Part of [im\_grey(3)](/im_grey/3.md).

## NAME

im\_grey, im\_fgrey, im\_make\_xy - creates a grey scale

## SYNOPSIS

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

**int im\_grey( image, xsize, ysize )**\
 **IMAGE \*image;**\
 **int xsize, ysize;**

**int im\_fgrey( image, xsize, ysize )**\
 **IMAGE \*image;**\
 **int xsize, ysize;**

**int im\_make\_xy( image, xsize, ysize )**\
 **IMAGE \*image;**\
 **int xsize, ysize;**

## DESCRIPTION

**[im\_grey(3)](/im_grey/3.md)** creates a one-band FMTUCHAR grey scale image of sizes xsize by ysize.  The intensity varies from 0 (left) to 255 (right).

**[im\_fgrey(3)](/im_fgrey/3.md)** works as  **[im\_grey(3)](/im_grey/3.md),** except that the output image is FMTFLOAT, allowing pixel values from 0 (left) to 1.0 (right).

**[im\_make\_xy(3)](/im_make_xy/3.md)** makes a two-band FMTUINT image where each pixel in band 0 has a value equal to the x coordinate, and each pixel in band 1 has a value equal to the y coordinate.

## RETURN VALUE

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

## SEE ALSO

[im\_black(3)](/im_black/3.md)

## COPYRIGHT

Birkbeck College and the National Gallery, 1995
