FastLED 3.9.15
Loading...
Searching...
No Matches

◆ getBytesPerPixel()

fl::u8 fl::getBytesPerPixel ( PixelFormat format)
inline

Definition at line 15 of file pixel.h.

15 {
16 switch (format) {
17 case PixelFormat::RGB565: return 2;
18 case PixelFormat::RGB888: return 3;
19 case PixelFormat::RGBA8888: return 4;
20 case PixelFormat::YUV420: return 1; // Simplified for luminance component
21 default: return 3;
22 }
23}
fl::string format(const char *fmt)
Format with no arguments.
Definition format.h:439

References format(), RGB565, RGB888, RGBA8888, and YUV420.

Referenced by fl::third_party::TJpgInstanceDecoder::allocateFrameBuffer(), and fl::third_party::TJpgInstanceDecoder::getBytesPerPixel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: