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,