move colour_dispatch to deprecated

This commit is contained in:
John Cupitt 2012-12-04 10:23:42 +00:00
parent 6f22c00df4
commit 1ceb85eb5b
4 changed files with 190 additions and 187 deletions

View File

@ -4,7 +4,6 @@ libcolour_la_SOURCES = \
colour.c \
colour.h \
colourspace.c \
colour_dispatch.c \
dE76.c \
dE00.c \
dECMC.c \

View File

@ -45,6 +45,195 @@
#include "colour.h"
/**
* SECTION: colour
* @short_description: colour operators
* @stability: Stable
* @see_also: <link linkend="libvips-arithmetic">arithmetic</link>
* @include: vips/vips.h
*
* These operators let you transform coordinates and images between colour
* spaces, calculate colour differences, and move
* to and from device spaces.
*
* Radiance images have four 8-bits bands and store 8 bits of R, G and B and
* another 8 bits of exponent, common to all channels. They are widely used in
* the HDR imaging community.
*
*
* The colour functions can be divided into three main groups. First,
* functions to transform images between the different colour spaces supported
* by VIPS: <emphasis>RGB</emphasis>, <emphasis>sRGB</emphasis>,
* <emphasis>XYZ</emphasis>, <emphasis>Yxy</emphasis>,
* <emphasis>Lab</emphasis>, <emphasis>LabQ</emphasis>,
* <emphasis>LabS</emphasis>, <emphasis>LCh</emphasis> and
* <emphasis>CMC</emphasis>). Use vips_colourspace() to move an image to a
* target colourspace using the best sequence of colour transform operations.
* Secondly, there are a set of operations for
* calculating colour difference metrics. Finally, VIPS wraps LittleCMS and
* uses it to provide a set of operations for reading and writing images with
* ICC profiles.
*
* This figure shows how the VIPS colour spaces interconvert:
*
* <inlinegraphic fileref="interconvert.png" format="PNG" />
*
* The colour spaces supported by VIPS are:
*
* <itemizedlist>
* <listitem>
* <para>
* <emphasis><code>LabQ</code></emphasis>
*
* This is the principal VIPS colorimetric storage format.
* LabQ images have four 8-bit bands and store 10 bits of L and 11 bits
* of a and b.
*
* You cannot perform calculations on <code>LabQ</code> images (they are
* tagged with %VIPS_CODING_LABQ), though a few operations such as
* vips_extract_area() will work directly with them.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>LabS</code></emphasis>
*
* This format represents coordinates in CIELAB space as a
* three-band #VIPS_FORMAT_SHORT image, scaled to fit the full range of
* bits. It is the best format for computation, being relatively
* compact, quick, and accurate. Colour values expressed in this way
* are hard to visualise.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>Lab</code></emphasis>
*
* Lab colourspace represents CIELAB colour values with a three-band
* #VIPS_FORMAT_FLOAT image. This is the simplest format for general
* work: adding the constant 50 to the L channel, for example, has the
* expected result.
*
* VIPS uses D65 LAB, but you can use other colour temperatures with a
* little effort, see vips_XYZ2Lab().
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>XYZ</code></emphasis>
*
* CIE XYZ colour space represented as a three-band #VIPS_FORMAT_FLOAT
* image.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>Yxy</code></emphasis>
*
* CIE Yxy colour space represented as a three-band #VIPS_FORMAT_FLOAT
* image.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>RGB</code> / <code>sRGB</code></emphasis>
*
* VIPS converts XYZ to and from sRGB using the usual formula:
*
* http://en.wikipedia.org/wiki/SRGB
*
* You can also use vips_icc_transform() and friends to go to and from
* device space with a generic profile.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>LCh</code></emphasis>
*
* Like <code>Lab</code>, but rectangular <code>ab</code> coordinates
* are replaced with
* polar <code>Ch</code> (Chroma and hue) coordinates.
* Hue angles are expressed in degrees.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>CMC</code></emphasis>
*
* A colour space based on the CMC(1:1) colour difference measurement.
* This is a highly uniform colour space, much better than CIELAB for
* expressing small differences.
*
* You can calculate metrics like CMC(2:1) by scaling the spaces before
* finding differences.
* </para>
* </listitem>
* </itemizedlist>
*/
/* Areas under curves for Dxx. 2 degree observer.
*/
/**
* VIPS_D93_X0:
*
* Areas under curves for D93, 2 degree observer.
*/
/**
* VIPS_D75_X0:
*
* Areas under curves for D75, 2 degree observer.
*/
/**
* VIPS_D65_X0:
*
* Areas under curves for D65, 2 degree observer.
*/
/**
* VIPS_D55_X0:
*
* Areas under curves for D55, 2 degree observer.
*/
/**
* VIPS_D50_X0:
*
* Areas under curves for D50, 2 degree observer.
*/
/**
* VIPS_A_X0:
*
* Areas under curves for illuminant A (2856K), 2 degree observer.
*/
/**
* VIPS_B_X0:
*
* Areas under curves for illuminant B (4874K), 2 degree observer.
*/
/**
* VIPS_C_X0:
*
* Areas under curves for illuminant C (6774K), 2 degree observer.
*/
/**
* VIPS_E_X0:
*
* Areas under curves for equal energy illuminant E.
*/
/**
* VIPS_D3250_X0:
*
* Areas under curves for black body at 3250K, 2 degree observer.
*/
G_DEFINE_ABSTRACT_TYPE( VipsColour, vips_colour, VIPS_TYPE_OPERATION );
/* Maximum number of input images -- why not?

View File

@ -4,6 +4,7 @@ libdeprecated_la_SOURCES = \
im_openslide2vips.c \
im_lab_morph.c \
deprecated_dispatch.c \
colour_dispatch.c \
wrapvips7.c \
lazy.c \
im_dif_std.c \

View File

@ -38,192 +38,6 @@
#include <vips/vips.h>
/**
* SECTION: colour
* @short_description: colour operators
* @stability: Stable
* @see_also: <link linkend="libvips-arithmetic">arithmetic</link>
* @include: vips/vips.h
*
* These operators let you transform coordinates and images between colour
* spaces, calculate colour differences, and move
* to and from device spaces.
*
* Radiance images have four 8-bits bands and store 8 bits of R, G and B and
* another 8 bits of exponent, common to all channels. They are widely used in
* the HDR imaging community.
*
*
* The colour functions can be divided into three main groups. First,
* functions to transform images between the different colour spaces supported
* by VIPS: <emphasis>RGB</emphasis> (also referred to as
* <emphasis>disp</emphasis>), <emphasis>sRGB</emphasis>,
* <emphasis>XYZ</emphasis>, <emphasis>Yxy</emphasis>,
* <emphasis>Lab</emphasis>, <emphasis>LabQ</emphasis>,
* <emphasis>LabS</emphasis>, <emphasis>LCh</emphasis> and
* <emphasis>CMC</emphasis>). Secondly, there are a set of operations for
* calculating colour difference metrics. Finally, VIPS wraps LittleCMS and
* uses it to provide a set of operations for reading and writing images with
* ICC profiles.
*
* This figure shows how the VIPS colour spaces interconvert:
*
* <inlinegraphic fileref="interconvert.png" format="PNG" />
*
* The colour spaces supported by VIPS are:
*
* <itemizedlist>
* <listitem>
* <para>
* <emphasis><code>LabQ</code></emphasis>
*
* This is the principal VIPS colorimetric storage format.
* LabQ images have four 8-bit bands and store 10 bits of L and 11 bits
* of a and b.
*
* You cannot perform calculations on <code>LabQ</code> images (they are
* tagged with %IM_CODING_LABQ), though a few operations such as
* im_extract_area() will work directly with them.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>LabS</code></emphasis>
*
* This format represents coordinates in CIELAB space as a
* three-band #IM_BANDFMT_SHORT image, scaled to fit the full range of
* bits. It is the best format for computation, being relatively
* compact, quick, and accurate. Colour values expressed in this way
* are hard to visualise.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>Lab</code></emphasis>
*
* Lab colourspace represents CIELAB colour values with a three-band
* #IM_BANDFMT_FLOAT image. This is the simplest format for general
* work: adding the constant 50 to the L channel, for example, has the
* expected result.
*
* VIPS uses D65 LAB, but you can use other colour temperatures with a
* little effort, see im_XYZ2Lab_temp().
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>XYZ</code></emphasis>
*
* CIE XYZ colour space represented as a three-band %IM_BANDFMT_FLOAT
* image.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>Yxy</code></emphasis>
*
* CIE Yxy colour space represented as a three-band %IM_BANDFMT_FLOAT
* image.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>RGB</code></emphasis>
*
* (also refered to as <code>disp</code>+) This is a generic 8-bit RGB
* image. VIPS has a system for going to and from RGB with a simple
* display structure, but it's mostly deprecated. See
* <link linkend="libvips-disp">disp</link>.
*
* Use im_icc_export() and friends as a modern replacement.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>LCh</code></emphasis>
*
* Like <code>Lab</code>, but rectangular <code>ab</code> coordinates
* are replaced with
* polar <code>Ch</code> (Chroma and hue) coordinates.
* Hue angles are expressed in degrees.
* </para>
* </listitem>
* <listitem>
* <para>
* <emphasis><code>CMC</code></emphasis>
*
* A colour space based on the CMC(1:1) colour difference measurement.
* This is a highly uniform colour space, much better than CIELAB for
* expressing small differences. Conversions to and from
* <code>CMC</code> are extremely slow.
* </para>
* </listitem>
* </itemizedlist>
*/
/* Areas under curves for Dxx. 2 degree observer.
*/
/**
* IM_D93_X0:
*
* Areas under curves for D93, 2 degree observer.
*/
/**
* IM_D75_X0:
*
* Areas under curves for D75, 2 degree observer.
*/
/**
* IM_D65_X0:
*
* Areas under curves for D65, 2 degree observer.
*/
/**
* IM_D55_X0:
*
* Areas under curves for D55, 2 degree observer.
*/
/**
* IM_D50_X0:
*
* Areas under curves for D50, 2 degree observer.
*/
/**
* IM_A_X0:
*
* Areas under curves for illuminant A (2856K), 2 degree observer.
*/
/**
* IM_B_X0:
*
* Areas under curves for illuminant B (4874K), 2 degree observer.
*/
/**
* IM_C_X0:
*
* Areas under curves for illuminant C (6774K), 2 degree observer.
*/
/**
* IM_E_X0:
*
* Areas under curves for equal energy illuminant E.
*/
/**
* IM_D3250_X0:
*
* Areas under curves for black body at 3250K, 2 degree observer.
*/
/* One image in, one out.
*/
static im_arg_desc one_in_one_out[] = {