mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 20:29:03 +00:00
LibGfx: Implement box sampling image scaling
Box sampling is a scaling algorithm that averages all the pixels that form the source for the target pixel. For example, if you would resize a 9x9 image to 3x3, each target pixel would encompass a 3x3 pixel area in the source image. Box sampling is a near perfect scaling algorithm for downscaling. When upscaling with this algorithm, the result is similar to nearest neighbor or smooth pixels.
This commit is contained in:
parent
4944b16bd5
commit
eb418bec32
Notes:
sideshowbarker
2024-07-16 20:02:54 +09:00
Author: https://github.com/gmta
Commit: eb418bec32
Pull-request: https://github.com/SerenityOS/serenity/pull/18914
2 changed files with 60 additions and 0 deletions
|
@ -45,6 +45,7 @@ public:
|
|||
NearestNeighbor,
|
||||
SmoothPixels,
|
||||
BilinearBlend,
|
||||
BoxSampling,
|
||||
None,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue