Comments (10)
Hey, thanks. Indeed the v9 tool doesn't work. The docs still link to the v8 converter but the output is not compatible with v9 LVGL. We'll keep this issue open until it's corrected.
Until then, 2 thing worked for me.
1.
Use the v8 converter and then edit the lv_img_dsc_t
at the bottom of the output.
E.g. change this output from the v8 converter...
const lv_img_dsc_t bulb = {
.header.cf = LV_IMG_CF_RAW_CHROMA_KEYED,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 60,
.header.h = 80,
.data_size = 17693,
.data = bulb_map,
};
...to this v9 compatible one...
const lv_img_dsc_t bulb = {
.header.cf = LV_COLOR_FORMAT_RAW,
.header.w = 60,
.header.h = 80,
.data_size = 17693,
.data = bulb_map,
};
2.
Or you can use the python tool. It worked for me.
python scripts/LVGLImage.py --ofmt C --cf RAW -o your_output_dir_path examples/libs/gif/bulb.gif
from lvgl.
The first method worked for me, but it only worked with images smaller than 140 x 140. When I tried to use a file 150 x 150, there were some issues; in the log, it simply said "Couldn't load the source" for images larger than this. Even after raising LV_MEM_SIZE to 128 * 1024, it is still not functioning. How to play a larger-sized GIF
And I have tried play gif from FATFS, but always crash. This is my code:
I already enable LV_USE_FS_FATFS flag in config file
how to play gif from fatfs. i flashed a .gif file to fatfs
from lvgl.
LVGLImage.py allowed me to try converting a gif to.C, and it worked. However, when I tried to convert to a.bin file to play from a file system, it consistently returned a.c file. I verified that the function in LVGLImage.py forces a.C file when the --cf option is set to RAW or RAW_ALPHA.
I tried to convert a .png file to .bin file it worked smoothly.
How i can to convert a gif to .bin file?
from lvgl.
I was able to load a 480x360 gif from a C file and from the FS as a .gif
. I don't know if 128kb is enough to load your gif and satisfy the other LVGL memory needs. The memory requirements of the GIF decoder are in the docs: https://docs.lvgl.io/master/libs/gif.html#memory-requirements so if you're using 16 bit depth mode, the decoder will use 90 kB, which is almost all of the 128 kB.
Yes I see what you mean. cc @XuNeo. I think it's because there's no use case for bin files in raw format. The GIF decoder operates on C arrays or unmodified .gif files, not .bin files.
from lvgl.
The GIF decoder operates on C arrays or unmodified .gif files, not .bin files.
Yes. There's no need to (and cannot ) change the suffix from .gif
to .bin
from lvgl.
I retested, and this time it worked when I loaded a.gif file from fatfs using the cloned library on May 27. The library I cloned on May 11th still throws errors.
Between two versions, is there a new version?
from lvgl.
I tested just now, I got the same behavior on both. But there could be something that changed which affects your platform π
I think you're almost out of memory and you do run out of memory in the May 11th version due to some subtle change in allocation patterns between versions. Recall this from my comment:
I don't know if 128kb is enough to load your gif and satisfy the other LVGL memory needs. The memory requirements of the GIF decoder are in the docs: https://docs.lvgl.io/master/libs/gif.html#memory-requirements so if you're using 16 bit depth mode, the decoder will use 90 kB, which is almost all of the 128 kB.
With that being said, here are the changed files since May 11th. That view is not very useful but I went through the list and the most relevant thing that changed related to GIF+FATFS was the lv_fs caching system was refactored and write caching was added. You're not writing though, so I'm not sure.
To clarify, it works with the latest version but not the May 11th version? The one thing I can think of is to try setting LV_FS_FATFS_CACHE_SIZE
to 0
if it isn't already, and see if that makes the May 11th version work for you.
from lvgl.
LV_FS_FATFS_CACHE_SIZE is always 0. Even after increasing LV_MEM_SIZE to 256*1024, the error message still shows. I believe that something related to memory was improved in the most recent version, and it works.Β
from lvgl.
256 kB sounds like enough! Since it's fixed, it's a less critical issue. If you're using Arduino IDE 2, I believe there's interactive debugging. You're welcome to try to pinpoint the cause of the failure and we can improve the related code if there's a risk of it still happening in the new versions.
from lvgl.
I close this issue because there was no activity here for a while.
If you have remarks about this topic feel free to comment here and reopen the issue.
from lvgl.
Related Issues (20)
- Kconfig symbol LV_STDLIB_BUILTIN HOT 7
- [Question] How to completely disable (i.e. not include at compile) all functionality related to input/touch? Basically output only
- A reflection on how to access inner fields of some of the widgets struct HOT 3
- Finalize the Font manager
- freertos mutex is recursive since #6573 but 'give' and 'take' macros are not recursive HOT 1
- LV_ASSERT_STYLE failing during initialisation of default theme HOT 1
- lv_obj_set_style_size(chart, 0, 0, LV_PART_INDICATOR); not working fine HOT 2
- type 'lv_draw_task_t' incomplete HOT 4
- Is there a non-packed monochrome mode in LVGL 9 HOT 1
- How to input "^" with lv_keyboard? HOT 5
- LV_CONF_PATH got expanded (on lv_conf_internal.h) causes error when path contain "linux" (Linux env.) HOT 2
- Display Rotation Issues HOT 1
- Enhance dropdown lists for smaller displays HOT 2
- software rotation is not longer available in 9.x HOT 7
- Jaggy Objects HOT 1
- How to modify the coordinates of the partial refresh areaοΌ HOT 1
- Lack Of Pre_Process controlls HOT 3
- rotate180_rgb565 code optimization to yield >= 25% increase in speed HOT 14
- Scrolling list of buttons by dragging often stops until touch is released HOT 1
- LV_INDEV_MODE_EVENT is not compatible with scroll momentum HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvgl.