diff --git a/libvips/colour/LCh2Lab.c b/libvips/colour/LCh2Lab.c index 76095d4c..8e3221f3 100644 --- a/libvips/colour/LCh2Lab.c +++ b/libvips/colour/LCh2Lab.c @@ -51,10 +51,10 @@ #include "colour.h" -typedef VipsColorimetric VipsLCh2Lab; -typedef VipsColorimetricClass VipsLCh2LabClass; +typedef VipsColourSpace VipsLCh2Lab; +typedef VipsColourSpaceClass VipsLCh2LabClass; -G_DEFINE_TYPE( VipsLCh2Lab, vips_LCh2Lab, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsLCh2Lab, vips_LCh2Lab, VIPS_TYPE_COLOUR_SPACE ); /* Process a buffer of data. */ diff --git a/libvips/colour/LCh2UCS.c b/libvips/colour/LCh2UCS.c index e9450d8d..564189d4 100644 --- a/libvips/colour/LCh2UCS.c +++ b/libvips/colour/LCh2UCS.c @@ -45,10 +45,10 @@ #include "colour.h" -typedef VipsColorimetric VipsLCh2UCS; -typedef VipsColorimetricClass VipsLCh2UCSClass; +typedef VipsColourSpace VipsLCh2UCS; +typedef VipsColourSpaceClass VipsLCh2UCSClass; -G_DEFINE_TYPE( VipsLCh2UCS, vips_LCh2UCS, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsLCh2UCS, vips_LCh2UCS, VIPS_TYPE_COLOUR_SPACE ); /** * vips_col_L2Lucs: diff --git a/libvips/colour/Lab2LCh.c b/libvips/colour/Lab2LCh.c index 9b384a1c..39f6dace 100644 --- a/libvips/colour/Lab2LCh.c +++ b/libvips/colour/Lab2LCh.c @@ -45,10 +45,10 @@ #include "colour.h" -typedef VipsColorimetric VipsLab2LCh; -typedef VipsColorimetricClass VipsLab2LChClass; +typedef VipsColourSpace VipsLab2LCh; +typedef VipsColourSpaceClass VipsLab2LChClass; -G_DEFINE_TYPE( VipsLab2LCh, vips_Lab2LCh, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsLab2LCh, vips_Lab2LCh, VIPS_TYPE_COLOUR_SPACE ); /** * vips_col_ab2h: diff --git a/libvips/colour/Lab2XYZ.c b/libvips/colour/Lab2XYZ.c index e0e110a4..d47fad75 100644 --- a/libvips/colour/Lab2XYZ.c +++ b/libvips/colour/Lab2XYZ.c @@ -61,7 +61,7 @@ #include "colour.h" typedef struct _VipsLab2XYZ { - VipsColorimetric parent_instance; + VipsColourSpace parent_instance; /* The colour temperature -- default to D65. */ @@ -75,9 +75,9 @@ typedef struct _VipsLab2XYZ { } VipsLab2XYZ; -typedef VipsColorimetricClass VipsLab2XYZClass; +typedef VipsColourSpaceClass VipsLab2XYZClass; -G_DEFINE_TYPE( VipsLab2XYZ, vips_Lab2XYZ, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsLab2XYZ, vips_Lab2XYZ, VIPS_TYPE_COLOUR_SPACE ); /* Process a buffer of data. */ diff --git a/libvips/colour/UCS2LCh.c b/libvips/colour/UCS2LCh.c index a7a0c9ed..4f1a2c8b 100644 --- a/libvips/colour/UCS2LCh.c +++ b/libvips/colour/UCS2LCh.c @@ -57,10 +57,10 @@ static float LI[1001]; static float CI[3001]; static float hI[101][361]; -typedef VipsColorimetric VipsUCS2LCh; -typedef VipsColorimetricClass VipsUCS2LChClass; +typedef VipsColourSpace VipsUCS2LCh; +typedef VipsColourSpaceClass VipsUCS2LChClass; -G_DEFINE_TYPE( VipsUCS2LCh, vips_UCS2LCh, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsUCS2LCh, vips_UCS2LCh, VIPS_TYPE_COLOUR_SPACE ); /* Generate LI (inverse) tables. */ diff --git a/libvips/colour/XYZ2Lab.c b/libvips/colour/XYZ2Lab.c index 38539a4f..51fd266e 100644 --- a/libvips/colour/XYZ2Lab.c +++ b/libvips/colour/XYZ2Lab.c @@ -70,7 +70,7 @@ float cbrt_table[QUANT_ELEMENTS]; typedef struct _VipsXYZ2Lab { - VipsColorimetric parent_instance; + VipsColourSpace parent_instance; /* The colour temperature -- default to D65. */ @@ -84,9 +84,9 @@ typedef struct _VipsXYZ2Lab { } VipsXYZ2Lab; -typedef VipsColorimetricClass VipsXYZ2LabClass; +typedef VipsColourSpaceClass VipsXYZ2LabClass; -G_DEFINE_TYPE( VipsXYZ2Lab, vips_XYZ2Lab, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsXYZ2Lab, vips_XYZ2Lab, VIPS_TYPE_COLOUR_SPACE ); static void * table_init( void *client ) diff --git a/libvips/colour/XYZ2Yxy.c b/libvips/colour/XYZ2Yxy.c index dbc3a9e8..02575c46 100644 --- a/libvips/colour/XYZ2Yxy.c +++ b/libvips/colour/XYZ2Yxy.c @@ -46,10 +46,10 @@ #include "colour.h" -typedef VipsColorimetric VipsXYZ2Yxy; -typedef VipsColorimetricClass VipsXYZ2YxyClass; +typedef VipsColourSpace VipsXYZ2Yxy; +typedef VipsColourSpaceClass VipsXYZ2YxyClass; -G_DEFINE_TYPE( VipsXYZ2Yxy, vips_XYZ2Yxy, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsXYZ2Yxy, vips_XYZ2Yxy, VIPS_TYPE_COLOUR_SPACE ); static void vips_XYZ2Yxy_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) diff --git a/libvips/colour/Yxy2XYZ.c b/libvips/colour/Yxy2XYZ.c index 9e7b2c5e..70b12692 100644 --- a/libvips/colour/Yxy2XYZ.c +++ b/libvips/colour/Yxy2XYZ.c @@ -46,10 +46,10 @@ #include "colour.h" -typedef VipsColorimetric VipsYxy2XYZ; -typedef VipsColorimetricClass VipsYxy2XYZClass; +typedef VipsColourSpace VipsYxy2XYZ; +typedef VipsColourSpaceClass VipsYxy2XYZClass; -G_DEFINE_TYPE( VipsYxy2XYZ, vips_Yxy2XYZ, VIPS_TYPE_COLORIMETRIC ); +G_DEFINE_TYPE( VipsYxy2XYZ, vips_Yxy2XYZ, VIPS_TYPE_COLOUR_SPACE ); void vips_Yxy2XYZ_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) diff --git a/libvips/colour/colour.c b/libvips/colour/colour.c index 98fdd563..47c92c7e 100644 --- a/libvips/colour/colour.c +++ b/libvips/colour/colour.c @@ -156,13 +156,13 @@ vips_colour_init( VipsColour *colour ) { } -G_DEFINE_ABSTRACT_TYPE( VipsColorimetric, vips_colorimetric, VIPS_TYPE_COLOUR ); +G_DEFINE_ABSTRACT_TYPE( VipsColourSpace, vips_space, VIPS_TYPE_COLOUR ); static int -vips_colorimetric_build( VipsObject *object ) +vips_space_build( VipsObject *object ) { VipsColour *colour = VIPS_COLOUR( object ); - VipsColorimetric *colorimetric = VIPS_COLORIMETRIC( object ); + VipsColourSpace *space = VIPS_COLOUR_SPACE( object ); VipsImage **t; @@ -173,7 +173,7 @@ vips_colorimetric_build( VipsObject *object ) /* We only process float. */ - if( vips_cast_float( colorimetric->in, &t[0], NULL ) ) + if( vips_cast_float( space->in, &t[0], NULL ) ) return( -1 ); colour->in[0] = t[0]; @@ -192,7 +192,7 @@ vips_colorimetric_build( VipsObject *object ) if( colour->in[0] ) g_object_ref( colour->in[0] ); - if( VIPS_OBJECT_CLASS( vips_colorimetric_parent_class )-> + if( VIPS_OBJECT_CLASS( vips_space_parent_class )-> build( object ) ) return( -1 ); @@ -213,7 +213,7 @@ vips_colorimetric_build( VipsObject *object ) } static void -vips_colorimetric_class_init( VipsColorimetricClass *class ) +vips_space_class_init( VipsColourSpaceClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); @@ -221,19 +221,19 @@ vips_colorimetric_class_init( VipsColorimetricClass *class ) gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; - vobject_class->nickname = "colorimetric"; - vobject_class->description = _( "colorimetric operations" ); - vobject_class->build = vips_colorimetric_build; + vobject_class->nickname = "space"; + vobject_class->description = _( "colour space transformations" ); + vobject_class->build = vips_space_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image" ), VIPS_ARGUMENT_REQUIRED_INPUT, - G_STRUCT_OFFSET( VipsColorimetric, in ) ); + G_STRUCT_OFFSET( VipsColourSpace, in ) ); } static void -vips_colorimetric_init( VipsColorimetric *colorimetric ) +vips_space_init( VipsColourSpace *space ) { } diff --git a/libvips/colour/colour.h b/libvips/colour/colour.h index 355bf37a..8abba81f 100644 --- a/libvips/colour/colour.h +++ b/libvips/colour/colour.h @@ -88,34 +88,34 @@ GType vips_colour_get_type( void ); /* A three float bands in, three float bands out colourspace transformation. */ -#define VIPS_TYPE_COLORIMETRIC (vips_colorimetric_get_type()) -#define VIPS_COLORIMETRIC( obj ) \ +#define VIPS_TYPE_COLOUR_SPACE (vips_space_get_type()) +#define VIPS_COLOUR_SPACE( obj ) \ (G_TYPE_CHECK_INSTANCE_CAST( (obj), \ - VIPS_TYPE_COLORIMETRIC, VipsColorimetric )) -#define VIPS_COLORIMETRIC_CLASS( klass ) \ + VIPS_TYPE_COLOUR_SPACE, VipsColourSpace )) +#define VIPS_COLOUR_SPACE_CLASS( klass ) \ (G_TYPE_CHECK_CLASS_CAST( (klass), \ - VIPS_TYPE_COLORIMETRIC, VipsColorimetricClass)) -#define VIPS_IS_COLORIMETRIC( obj ) \ - (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_COLORIMETRIC )) -#define VIPS_IS_COLORIMETRIC_CLASS( klass ) \ - (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_COLORIMETRIC )) -#define VIPS_COLORIMETRIC_GET_CLASS( obj ) \ + VIPS_TYPE_COLOUR_SPACE, VipsColourSpaceClass)) +#define VIPS_IS_COLOUR_SPACE( obj ) \ + (G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_COLOUR_SPACE )) +#define VIPS_IS_COLOUR_SPACE_CLASS( klass ) \ + (G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_COLOUR_SPACE )) +#define VIPS_COLOUR_SPACE_GET_CLASS( obj ) \ (G_TYPE_INSTANCE_GET_CLASS( (obj), \ - VIPS_TYPE_COLORIMETRIC, VipsColorimetricClass )) + VIPS_TYPE_COLOUR_SPACE, VipsColourSpaceClass )) -typedef struct _VipsColorimetric { +typedef struct _VipsColourSpace { VipsColour parent_instance; VipsImage *in; -} VipsColorimetric; +} VipsColourSpace; -typedef struct _VipsColorimetricClass { +typedef struct _VipsColourSpaceClass { VipsColourClass parent_class; -} VipsColorimetricClass; +} VipsColourSpaceClass; -GType vips_colorimetric_get_type( void ); +GType vips_space_get_type( void ); #ifdef __cplusplus }