FastLED 3.10.8
Loading...
Searching...
No Matches

◆ getBytesPerPixel()

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

Definition at line 20 of file pixel.h.

20 {
21 switch (format) {
22 case PixelFormat::RGB565: return 2;
23 case PixelFormat::RGB888: return 3;
24 case PixelFormat::RGBA8888: return 4;
25 case PixelFormat::YUV420: return 1; // Simplified for luminance component
26 case PixelFormat::Rgb16: return 6;
27 default: return 0;
28 }
29}
fl::string format(const char *fmt) FL_NO_EXCEPT
Format with no arguments.
Definition format.h:439

References FL_NO_EXCEPT, format(), Rgb16, 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: