From bc0c4f60d60a394f6a4a2844e2a13adbba92cff7 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 11 Nov 2013 17:38:34 +0000 Subject: [PATCH] oops fix build --- TODO | 2 -- libvips/conversion/Makefile.am | 2 +- libvips/conversion/conversion.c | 4 ++-- libvips/conversion/{gammacorrect.c => gamma.c} | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) rename libvips/conversion/{gammacorrect.c => gamma.c} (98%) diff --git a/TODO b/TODO index 462018cb..0ae8d84d 100644 --- a/TODO +++ b/TODO @@ -12,8 +12,6 @@ note on memuse page -- add vips_gamma(), see rad etc. - - do conv and morph quickly as simple wrappers over the vips7 operations - add vips_gaussian_blur() with approx / int / float precision, maybe diff --git a/libvips/conversion/Makefile.am b/libvips/conversion/Makefile.am index 8e3cb0af..9b0e786c 100644 --- a/libvips/conversion/Makefile.am +++ b/libvips/conversion/Makefile.am @@ -4,7 +4,7 @@ libconversion_la_SOURCES = \ conversion.c \ pconversion.h \ tilecache.c \ - gammacorrect.c \ + gamma.c \ sequential.c \ flatten.c \ cache.c \ diff --git a/libvips/conversion/conversion.c b/libvips/conversion/conversion.c index edb5c3e8..980cfe51 100644 --- a/libvips/conversion/conversion.c +++ b/libvips/conversion/conversion.c @@ -232,7 +232,7 @@ vips_conversion_operation_init( void ) #endif /*HAVE_PANGOFT2*/ extern GType vips_xyz_get_type( void ); extern GType vips_falsecolour_get_type( void ); - extern GType vips_gammacorrect_get_type( void ); + extern GType vips_gamma_get_type( void ); vips_copy_get_type(); vips_tile_cache_get_type(); @@ -270,7 +270,7 @@ vips_conversion_operation_init( void ) #endif /*HAVE_PANGOFT2*/ vips_xyz_get_type(); vips_falsecolour_get_type(); - vips_gammacorrect_get_type(); + vips_gamma_get_type(); } /* The common part of most binary conversion diff --git a/libvips/conversion/gammacorrect.c b/libvips/conversion/gamma.c similarity index 98% rename from libvips/conversion/gammacorrect.c rename to libvips/conversion/gamma.c index 93aa1e93..2063b7bb 100644 --- a/libvips/conversion/gammacorrect.c +++ b/libvips/conversion/gamma.c @@ -93,10 +93,10 @@ vips_gamma_build( VipsObject *object ) return( -1 ); scale = pow( vips_gamma_maxval[in->BandFmt], - gamma->exponent ) / + 1.0 / gamma->exponent ) / vips_gamma_maxval[in->BandFmt]; - if( in->BandFmt == VIPS_FORMAT_UCHAR && + if( in->BandFmt == VIPS_FORMAT_UCHAR || in->BandFmt == VIPS_FORMAT_USHORT ) { if( vips_identity( &t[0], "ushort", in->BandFmt == VIPS_FORMAT_USHORT,