Build LAB to sRGB tables only when first needed

Reduces libvips start-up time by ~20ms
This commit is contained in:
Lovell Fuller 2016-03-09 19:20:57 +00:00
parent efa12029a6
commit a40397c438
1 changed files with 2 additions and 2 deletions

View File

@ -468,6 +468,8 @@ vips_col_make_tables_LabQ2sRGB( void )
static void
vips_LabQ2sRGB_line( VipsColour *colour, VipsPel *q, VipsPel **in, int width )
{
vips_col_make_tables_LabQ2sRGB();
unsigned char *p = (unsigned char *) in[0];
int i, t;
@ -526,8 +528,6 @@ vips_LabQ2sRGB_class_init( VipsLabQ2sRGBClass *class )
object_class->description = _( "convert a LabQ image to sRGB" );
colour_class->process_line = vips_LabQ2sRGB_line;
vips_col_make_tables_LabQ2sRGB();
}
static void