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

◆ getJpgSize()

JRESULT fl::third_party::TJpg_Decoder::getJpgSize ( uint16_t * w,
uint16_t * h,
const uint8_t array[],
size_t array_size )

Definition at line 168 of file TJpg_Decoder.cpp.hpp.

168 {
169 JDEC jdec;
170 JRESULT jresult = JDR_OK;
171
172 *w = 0;
173 *h = 0;
174
176 array_index = 0;
177 array_data = jpeg_data;
178 array_size = data_size;
179
180 // Analyse input data - pass 'this' as device pointer for callbacks
181 jresult = jd_prepare(&jdec, jd_input, workspace, TJPGD_WORKSPACE_SIZE, this);
182
183 if (jresult == JDR_OK) {
184 *w = jdec.width;
185 *h = jdec.height;
186 }
187
188 return jresult;
189}
uint8_t workspace[TJPGD_WORKSPACE_SIZE]
static size_t jd_input(JDEC *jdec, uint8_t *buf, size_t len) FL_NOEXCEPT
JRESULT jd_prepare(JDEC *jd, size_t(*infunc)(JDEC *, uint8_t *, size_t), void *pool, size_t sz_pool, void *dev) FL_NOEXCEPT
struct JDEC JDEC
Definition tjpgd.h:49
#define TJPGD_WORKSPACE_SIZE
Definition tjpgdcnf.h:39

References array_data, array_index, array_size, FL_NOEXCEPT, fl::third_party::JDEC::height, jd_input(), fl::third_party::jd_prepare(), fl::third_party::JDR_OK, jpg_source, fl::third_party::TJPG_ARRAY, TJPGD_WORKSPACE_SIZE, fl::third_party::JDEC::width, and workspace.

+ Here is the call graph for this function: