FastLED 3.9.15
Loading...
Searching...
No Matches
downscale.h
Go to the documentation of this file.
1
2#pragma once
3
4/*
5Experimental bilinearn downscaling algorithm. Not tested yet and completely
6"vibe-coded" by ai.
7
8If you use this and find an issue then please report it.
9*/
10
11#include "crgb.h"
12
13namespace fl {
14
15class XYMap;
16
17void downscale(const CRGB *src, const XYMap &srcXY, CRGB *dst,
18 const XYMap &dstXY);
19
20// Optimized versions for downscaling by 50%. This is here for testing purposes
21// mostly. You should prefer to use downscale(...) instead of calling these
22// functions. It's important to note that downscale(...) will invoke
23// downscaleHalf(...) automatically when the source and destination are half the
24// size of each other.
25void downscaleHalf(const CRGB *src, uint16_t srcWidth, uint16_t srcHeight,
26 CRGB *dst);
27void downscaleHalf(const CRGB *src, const XYMap &srcXY, CRGB *dst,
28 const XYMap &dstXY);
29void downscaleArbitrary(const CRGB *src, const XYMap &srcXY, CRGB *dst,
30 const XYMap &dstXY);
31
32} // namespace fl
Defines the red, green, and blue (RGB) pixel struct.
void downscale(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY)
void downscaleArbitrary(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY)
Definition downscale.cpp:81
void downscaleHalf(const CRGB *src, uint16_t srcWidth, uint16_t srcHeight, CRGB *dst)
Definition downscale.cpp:17
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16