---
name: "im_hist"
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_hist"
---

# im\_hist(3)

create a displayable histogram from an image

## NAME

im\_hist - create a displayable histogram from an image

## SYNOPSIS

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

**int im\_hist( in, plotofhist, bandno )**\
 **IMAGE \*in, \*plotofhist;**\
 **int bandno;**

## DESCRIPTION

**im\_hist()** creates a displayable histogram file for the image held by the image descriptor  **in.** The created displayable histogram is held in the IMAGE descriptor  **plotofhist.** If  **bandno** == -1 a displayable histogram of all input bands is created else the histogram of bandno only is created.

See **[im\_histplot(3)](/im_histplot/3.md)** for rules on the size and scaling og the result.

## RETURN VALUE

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

## SEE ALSO

[im\_histgr(3)](/im_histgr/3.md), [im\_histplot(3)](/im_histplot/3.md).

## COPYRIGHT

N. Dessipris

## AUTHOR

N. Dessipris - 10/05/1991
