diff options
-rw-r--r-- | vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx index bc7f3a8361f4..59ed78c8d6f3 100644 --- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx +++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx @@ -29,6 +29,17 @@ #include <svdata.hxx> #include <sal/log.hxx> +/* +A scaling algorithm that uses bilinear if not downscaling too much, +and averaging otherwise (bilinear would produce poor results for big downscaling). + +By default the combination of two filters is used: bilinear and averaging algorithm. +Bilinear filtering is used for bitmap enlarging and shrinking till factor 0.6. Below +this bilinear gives bad results because of limited sampling. For such cases averaging +is used which is a simple algorithm for shrinking. In averaging the algorithm +calculates the average of samples which result is the new pixel. +*/ + namespace { constexpr int MAP_PRECISION = 7; |