---
name: "im_float2rad"
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_rad2float"
---

# im\_float2rad(3)

convert RAD coded images to float and back

Part of [im\_rad2float(3)](/im_rad2float/3.md).

## NAME

im\_rad2float, im\_float2rad - convert RAD coded images to float and back

## SYNOPSIS

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

int im\_rad2float( IMAGE \*in, IMAGE \*out )

int im\_float2rad( IMAGE \*in, IMAGE \*out )

## DESCRIPTION

These functions convert  **IM\_CODING\_RAD** images to 3-band float and back.

**[im\_rad2float(3)](/im_rad2float/3.md)** unpacks a 4-band uchar image in **IM\_CODING\_RAD** format to 3-band float. RAD images are used by the  **radiance(1)** family of programs for HDR imaging.

Some VIPS operations will work directly on the packed RAD images (such as  **[im\_extract\_area(3)](/im_extract_area/3.md)** ) but many will require the image to be unpacked to 3-band float for processing.

**[im\_float2rad(3)](/im_float2rad/3.md)** packs a 3-band float image back to 4-band uchar in **IM\_CODING\_RAD** format.

## RETURN VALUE

The functions return 0 on success and -1 on error.

## SEE ALSO

[im\_LabQ2Lab(3)](/im_LabQ2Lab/3.md), im\_format(3).

## AUTHOR

J. Cupitt - 23 March 2009
