From d6e4f6d492230574cb8409f127318250a8d0d32d Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 30 May 2009 16:01:29 +0000 Subject: [PATCH] img2twit: reinstate old interpolation tuning for final picture quality. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3540 92316355-f0b4-4df1-b90c-862c8a59935f --- examples/img2twit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/img2twit.cpp b/examples/img2twit.cpp index d0d1f4e..ca9d967 100644 --- a/examples/img2twit.cpp +++ b/examples/img2twit.cpp @@ -749,8 +749,9 @@ static void render(pipi_image_t *dst, int rx, int ry, int rw, int rh) //float k = pow((*it).second, (1.0f + fs)); // Try to attenuate peak artifacts - //k /= (0.1 * (RANGE_X * RANGE_X + RANGE_Y * RANGE_Y) - // + (myx - fx) * (myx - fx) + (myy - fy) * (myy - fy)); + k *= pow(((myx - fx) * (myx - fx) + (myy - fy) * (myy - fy) + + 0.01) / (RANGE_X * RANGE_X + RANGE_Y * RANGE_Y), + -0.5); // Cute circles //k = 1.0 / (0.015 * (RANGE_X * RANGE_X + RANGE_Y * RANGE_Y)