Lines Matching refs:to

31   - *always zero*: 3 bits which need to be always zero
33 - **data**: pointer to an array where the image itself is stored
44 To deal with files you need to add a storage *Drive* to LVGL. In short,
46 registered in LVGL to make file operations. You can add an interface to
48 system to read data from an SPI Flash memory. In every case, a *Drive*
49 is just an abstraction to read and/or write data to memory. See the
50 :ref:`File system <overview_file_system>` section to learn more.
55 easier to replace without needing to rebuild the main program.
70 the set opacity. The source image has to be an alpha channel. This is
71 ideal for bitmaps similar to fonts where the whole image is one color
89 You can store images in a *Raw* format to indicate that it's not encoded
91 needs to be used to decode the image.
99 You can add images to LVGL in two ways:
110 Adding an image to LVGL via the online converter is easy.
112 1. You need to select a *BMP*, *PNG* or *JPG* image first.
126 In the case of binary files, you need to specify the color format you
138 variable to display it using LVGL. For example:
153 Another (possibly simpler) option to create and display an image at
154 run-time is to use the :ref:`Canvas <lv_canvas>` Widget.
159 The simplest way to use an image in LVGL is to display it with an
173 :cpp:expr:`LV_IMAGE_DECLARE(my_icon_dsc)` to declare the image in the file where
174 you want to use it.
186 To handle non-built-in image formats, you need to use external libraries
187 and attach them to LVGL via the *Image decoder* interface.
194 - set it to ``NULL`` to indicate the image can be read line-by-line.
198 You can add any number of image decoders. When an image needs to be
218 The easiest way to create a custom image is to use the online image
222 need to attach an image decoder that will parse that bitmap and generate
226 accordingly. You should choose the correct format according to your needs:
231 to *True color* according to the format described in the :ref:`overview_image_color_formats` sectio…
237 Here's an example of getting LVGL to work with PNG images.
239 First, you need to create a new image decoder and set some functions to
254 * @param decoder pointer to the decoder where this function belongs
255 * @param src can be file name or pointer to a C array
274 * @param decoder pointer to the decoder where this function belongs
285 …f `dsc->decoded` is `NULL`, the `decoder_get_area` function will be called to get the image data l…
288 … image format is different than original format. For PNG it's usually decoded to ARGB8888 format */
299 * @param decoder pointer to the decoder where this function belongs
301 * @param full_area input parameter. the full area to decode after enough subsequent calls
302 …am decoded_area input+output parameter. set the values to `LV_COORD_MIN` for the first call and to
304 …* @return LV_RESULT_OK: ok; LV_RESULT_INVALID: failed or there is nothing left to deco…
310 …* If `dsc->decoded` is always set in `decoder_open` then `decoder_get_area` does not need to be im…
311 …c->decoded` is only sometimes set or never set in `decoder_open` then `decoder_get_area` is used to
319 /* if `decoded_area` has a field set to `LV_COORD_MIN` then reset decoding */
357 * @param decoder pointer to the decoder where this function belongs
377 - In ``decoder_open``, you should try to open the image source pointed by
380 However, if you can open the image, a pointer to the decoded image should be
381 set in ``dsc->decoded``. If the format is known, but you don't want to
383 use ``decoder_get_area`` to get the image area pixels.
395 manually as well. Create an :cpp:type:`lv_image_decoder_dsc_t` variable to describe
399 images to tell color of the image.
423 First, call a custom post-processing function after ``lv_image_decoder_open`` to adjust the data in…
424 and then mark the processing status in ``cache_entry->process_state`` (to avoid repeated post-proce…
488 LV_LOG_ERROR("Failed to open image");
494 LV_LOG_ERROR("Failed to post-process image");
505 Sometimes it takes a lot of time to open an image. Continuously decoding
507 inefficient and detrimental to the user experience.
511 ``dsc->decoded`` instead of needing to decode them again.
513 Of course, caching images is resource intensive as it uses more RAM to
514 store the decoded image. LVGL tries to optimize the process as much as
515 possible (see below), but you will still need to evaluate if this would
535 images. Instead, the library will close one of the cached images to free
538 To decide which image to close, LVGL uses a measurement it previously
539 made of how long it took to open the image. Cache entries that hold
540 slower-to-open images are considered more valuable and are kept in the
543 If you want or need to override LVGL's measurement, you can manually set
545 ``cache_entry->weight = time_ms`` to give a higher or lower value. (Leave
546 it unchanged to let LVGL control it.)
550 *weight* values to make them older.
552 to make it more alive.
564 Therefore, it's the user's responsibility to be sure there is enough RAM
565 to cache even the largest images at the same time.
572 cached and you then change the underlying PNG file, you need to notify
573 LVGL to cache the image again. Otherwise, there is no easy way of
582 If you want to implement your own cache algorithm, you can refer to the
583 following code to replace the LVGL built-in cache manager: