From c95bbe43b5a4f745d78a0f64d0ec557e6d36dca4 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 26 Feb 2016 12:26:12 +0000 Subject: [PATCH] oops in sharpen --- TODO | 14 ++++++++++++++ libvips/convolution/sharpen.c | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 152e1822..5b89b6cc 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,17 @@ +- try + + $ vips sharpen babe.jpg x.v + + horrible posterization, looks like too few bits + + $ vips colourspace babe.jpg x.v rgb16 + $ vips sharpen x.v x2.v + $ vips colourspace x2.v x3.v srgb + + no better, strange + +- try SEQ_UNBUFFERED on jpg source, get out of order error? + - add reduceh > 3 warning for wtc shrink to 1280x1280 or was it 1703? diff --git a/libvips/convolution/sharpen.c b/libvips/convolution/sharpen.c index 918853cc..5a6e53f5 100644 --- a/libvips/convolution/sharpen.c +++ b/libvips/convolution/sharpen.c @@ -224,7 +224,7 @@ vips_sharpen_build( VipsObject *object ) if( v < -sharpen->x1 ) /* Left of -x1. */ - y = (v - sharpen->x1) * sharpen->m2 + + y = (v + sharpen->x1) * sharpen->m2 + -sharpen->x1 * sharpen->m1; else if( v < sharpen->x1 ) /* Centre section. @@ -252,6 +252,7 @@ vips_sharpen_build( VipsObject *object ) for( i = 0; i < 65536; i++ ) *VIPS_MATRIX( mat, i, 0 ) = sharpen->lut[i]; vips_image_write_to_file( mat, "x.v", NULL ); + printf( "lut written to x.v\n" ); g_object_unref( mat ); } #endif /*DEBUG*/