---
name: "im_append_Hist"
section: "3"
platform: "linux"
package: "libvips10-dev"
version: "7.10.21-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/im_cp_desc"
---

# im\_append\_Hist(3)

copy most of an image descriptor to another image descriptor.

Part of [im\_cp\_desc(3)](/im_cp_desc/3.md).

## NAME

im\_cp\_desc, im\_append\_Hist - copy most of an image descriptor to another image descriptor.

## SYNOPSIS

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

**int im\_cp\_desc(image1, image2)**\
 **IMAGE \*image1, \*image2;**

**int im\_append\_desc(image1, image2)**\
 **IMAGE \*image1, \*image2;**

## DESCRIPTION

**[im\_cp\_desc(3)](/im_cp_desc/3.md)** copies the fields describing the size, bands, type, resolution, history, and coding from image2 to image1. No other fields are copied.

This function is primarily used in applications where a copy of the details of an image are necessary for a newly created image.  Called by most im\_functions. Returns an error if an uninitialised IMAGE is copied.

**[im\_append\_Hist(3)](/im_append_Hist/3.md)** appends the history attached to image2 to the end of the history on image1. It is used by image processing functions which take more than one image as input, and which need to make sure that all the input history appears in the output.

The first line of image2 history is not copied, as this conventionally holds background information which is not part of the file history.

## RETURN VALUE

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

## COPYRIGHT

N. Dessipris

## AUTHOR

N. Dessipris - 11/04/1990
