---
name: "im_disp2Lab"
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_Lab2UCS"
---

# im\_disp2Lab(3)

derived colour space conversion functions

Part of [im\_Lab2UCS(3)](/im_Lab2UCS/3.md).

## NAME

im\_Lab2UCS, im\_LabQ2XYZ, im\_UCS2Lab, im\_Lab2disp, im\_disp2Lab, im\_UCS2XYZ, im\_XYZ2UCS - derived colour space conversion functions

## SYNOPSIS

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

int im\_Lab2UCS(in, out)\
 IMAGE \*in, \*out;

int im\_LabQ2XYZ(in, out)\
 IMAGE \*in, \*out;

int im\_UCS2Lab(in, out)\
 IMAGE \*in, \*out;

int im\_Lab2disp(in, out, display)\
 IMAGE \*in, \*out;\
 struct im\_col\_display \*display;

int im\_disp2Lab(in, out, display)\
 IMAGE \*in, \*out;\
 struct im\_col\_display \*display;

int im\_UCS2XYZ(in, out)\
 IMAGE \*in, \*out;

int im\_XYZ2UCS(in, out)\
 IMAGE \*in, \*out;

## DESCRIPTION

These functions are built on the basic VIPS colour space transformations as a convenience for the programmer. See [im\_Lab2XYZ(3)](/im_Lab2XYZ/3.md) for an explanation of the colour spaces and the basic conversion functions.

[im\_Lab2UCS(3)](/im_Lab2UCS/3.md), for example, is defined as:

  int\
   im\_Lab2UCS( IMAGE \*in, IMAGE \*out )\
   {\
      IMAGE \*t1 = im\_open\_local( out, \
         "im\_Lab2UCS intermediate", "p" );

     if( !t1 \|\| \
         im\_Lab2LCh( in, t1 ) \|\| \
         im\_LCh2UCS( t1, out ) )\
         return( -1 );

     return( 0 );\
   }

## RETURN VALUE

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

## SEE ALSO

[im\_col\_XYZ2rgb(3)](/im_col_XYZ2rgb/3.md), [im\_dE\_fromLab(3)](/im_dE_fromLab/3.md), [im\_LabQ2Lab(3)](/im_LabQ2Lab/3.md), [im\_Lab2disp(3)](/im_Lab2disp/3.md).

## COPYRIGHT

National Gallery and Birkbeck College, 1990 - 1993

## AUTHOR

K. Martinez - 2/12/1992\
 J. Cupitt - 21/7/93
