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

◆ nsgif__error_from_lzw()

static nsgif_error fl::third_party::nsgif__error_from_lzw ( lzw_result l_res)
static

Convert an LZW result code to equivalent GIF result code.

Parameters
[in]l_resLZW response code.
Returns
GIF result code.

Definition at line 182 of file gif.cpp.hpp.

183{
184 static const nsgif_error g_res[] = {
185 NSGIF_OK, /* LZW_OK */
186 NSGIF_ERR_END_OF_DATA, /* LZW_OK_EOD */
187 NSGIF_ERR_OOM, /* LZW_NO_MEM */
188 NSGIF_ERR_END_OF_DATA, /* LZW_NO_DATA */
189 NSGIF_ERR_DATA_FRAME, /* LZW_EOI_CODE */
190 NSGIF_ERR_DATA_FRAME, /* LZW_NO_COLOUR */
191 NSGIF_ERR_DATA_FRAME, /* LZW_BAD_ICODE */
192 NSGIF_ERR_DATA_FRAME, /* LZW_BAD_PARAM */
193 NSGIF_ERR_DATA_FRAME, /* LZW_BAD_CODE */
194 };
195 FL_ASSERT(l_res != LZW_BAD_PARAM, "LZW bad parameter");
196 FL_ASSERT(l_res != LZW_NO_COLOUR, "LZW no colour");
197 return g_res[l_res];
198}
#define FL_ASSERT(x, MSG)
Definition assert.h:6
nsgif_error
LibNSGIF return codes.
Definition nsgif.hpp:58
@ NSGIF_ERR_OOM
Out of memory error.
Definition nsgif.hpp:67
@ NSGIF_ERR_END_OF_DATA
Unexpected end of GIF source data.
Definition nsgif.hpp:87
@ NSGIF_ERR_DATA_FRAME
GIF source data contained an error in a frame.
Definition nsgif.hpp:82
@ NSGIF_OK
Success.
Definition nsgif.hpp:62
@ LZW_NO_COLOUR
Error: No colour map provided.
Definition lzw.h:39
@ LZW_BAD_PARAM
Error: Bad function parameter.
Definition lzw.h:41

References FL_ASSERT, FL_NOEXCEPT, LZW_BAD_PARAM, LZW_NO_COLOUR, NSGIF_ERR_DATA_FRAME, NSGIF_ERR_END_OF_DATA, NSGIF_ERR_OOM, and NSGIF_OK.

Referenced by nsgif__decode_complex(), nsgif__decode_simple(), and nsgif_data_scan().

+ Here is the caller graph for this function: