mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +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
31fa449538
commit
6242d8e023
2 changed files with 75 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