From 079d90a0e58cde797f3816a793a7cdb05d18d2bc Mon Sep 17 00:00:00 2001 From: Cyril Hrubis Date: Sun, 1 Jul 2012 21:38:57 +0200 Subject: [PATCH] doc: Update resapling docs. --- doc/filters.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/filters.txt b/doc/filters.txt index 9d4228ed..074e7d49 100644 --- a/doc/filters.txt +++ b/doc/filters.txt @@ -693,8 +693,8 @@ int GP_FilterConvolution(const GP_Context *src, GP_Context *dst, GP_ProgressCallback *callback); GP_Context *GP_FilterConvolutionAlloc(const GP_Context *src, - const GP_FilterKernel2D *kernel, - GP_ProgressCallback *callback); + const GP_FilterKernel2D *kernel, + GP_ProgressCallback *callback); void GP_FilterKernel2DPrint(const GP_FilterKernel2D *kernel); ------------------------------------------------------------------------------- @@ -854,8 +854,12 @@ Interpolation filters #include typedef enum GP_InterpolationType { - GP_INTERP_NN, /* Nearest Neighbour */ - GP_INTERP_CUBIC, /* Bicubic */ + GP_INTERP_NN, /* Nearest Neighbour */ + GP_INTERP_LINEAR_INT, /* Bilinear - fixed point arithmetics */ + GP_INTERP_LINEAR_LF_INT, /* Bilinear + low pass filter on downscaling */ + GP_INTERP_CUBIC, /* Bicubic */ + GP_INTERP_CUBIC_INT, /* Bicubic - fixed point arithmetics */ + GP_INTERP_MAX = GP_INTERP_CUBIC_INT, } GP_InterpolationType; GP_Context *GP_FilterResize(const GP_Context *src, GP_Context *dst, @@ -882,6 +886,14 @@ Fast, but produces "pixelated" images. May however work better for images with sharp edges mostly consisting of big one color regions (it doesn't blur the result on upscaling). +Also is commonly used to show preview before you resample the image correctly. + +Bilinear Interpolation +^^^^^^^^^^^^^^^^^^^^^^ + +Bilinear is faster than bicubic interpolation and produces quite good results +expecially the low pass variant doesn't need additional filter on downsampling. + Bicubic Interpolation ^^^^^^^^^^^^^^^^^^^^^ -- 2.11.4.GIT