mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +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
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