Comments (6)
Hi, what version are you using (v8, v9, etc.)?
When I try your to rotate a binary image it doesn't appear correctly, so that's definitely a concern.
However I do not get a memory error. I think an error is being encountered and the program proceeds with a NULL
or otherwise invalid value. Could you please enable LV_LOG_LEVEL_WARN
and LV_USE_ASSERT_NULL
, LV_USE_ASSERT_MALLOC
if not already enabled?
Also, does it work with the binary image when it's not rotated?
from lvgl.
Hi, what version are you using (v8, v9, etc.)?
When I try your to rotate a binary image it doesn't appear correctly, so that's definitely a concern.
However I do not get a memory error. I think an error is being encountered and the program proceeds with a
NULL
or otherwise invalid value. Could you please enableLV_LOG_LEVEL_WARN
andLV_USE_ASSERT_NULL
,LV_USE_ASSERT_MALLOC
if not already enabled?Also, does it work with the binary image when it's not rotated?
Hi, I use v9.1.0, I can see binary images when it is not rotated, but I have not tried unbinary pictures. All things are enabled as you suggested
from lvgl.
I have added it as c array not binary and it is rotated with lv_img_set_angle function successfully. But when I try it with binary image, no image is shown on the screen.
Second issue is angle value. For one picture when I write there 434, I see MemManageHandler fault, but when I write 435, I don't see this fault, screen can load but image doesn't shown in screen. I also tried it negative values same result as positive ones.
I have tried these 434,435 values for different image, it does not work. For both value I see MemManageHandler so it is related with picture(some of it's parameters maybe width height). But for sure I could not see rotated binary image on the screen.
from lvgl.
I use ARGB8888 color format. There is written sth useful here
The transformations require the whole image to be available. Therefore indexed images (LV_COLOR_FORMAT_I1/2/4/8_...), alpha only images cannot be transformed. In other words transformations work only on normal (A)RGB or A8 images stored as C array, or if a custom Image decoder returns the whole image.
I need to find a way to rotate binary file :/ I have to use them as binary format for update strategy...
from lvgl.
Ah, so it's not supported for now. Good find. I think some undefined behavior is reasonable when you try to transform it, then. I could not reproduce the lv_img_set_angle(img_test_1, 434)
crash but it's not worth fixing until it's supposed to be supported.
The situation right now is a bit weird.
bin decoder | png decoder | |
---|---|---|
decodes whole image | 👎️ | ✅️ |
transform works | 👎️ | ✅️ |
transform works if whole image was cached | 👎️ | N/A |
The bin decoder decoding incrementally is supposed to be helpful, but it actually punishes users who want to transform the image. Even if the image cache is big enough to cache the whole image after the first decode, it still can't be transformed even though the whole image is now available.
I think something could be done about this. Maybe a flag for the image decoder that tells it to decode the whole image immediately.
For your requirement of needing to load an image dynamically, there are a few options! 🙂 The simplest is to just store the image on your storage device as PNG! I'd recommend enabling image caching ( (nevermind, it persists if the image object isn't deleted) Another option is to store the raw image data from the C array in a binary file, and then LV_CACHE_DEF_SIZE
and LV_IMAGE_HEADER_CACHE_DEF_CNT
in lv_conf.h) so it doesn't read the file every time.lv_fs_read
it and initialize the fields of an lv_image_dsc_t
manually.
from lvgl.
We need some feedback on this issue.
Now we mark this as "stale" because there was no activity here for 14 days.
Remove the "stale" label or comment else this will be closed in 7 days.
from lvgl.
Related Issues (20)
- Setting system time under Linux affects ticks HOT 1
- screen refresh rate is very low HOT 5
- Problem with lv_demo_widgets demo(Instrument panel) after porting code to hardware HOT 1
- Button Matrix cannot be removed from lv_conf.h HOT 1
- Tiny TTF causes crash in certain situations HOT 1
- Tiny TTF should be caching stbtt_FindGlyphIndex HOT 26
- Line 11 of src/libs/tiny_ttf.c declared incorrectly HOT 1
- Docs build break HOT 1
- 8.4/9.1 Hardware based display rotation input devices HOT 5
- LV_COLOR_16_SWAP removal and performance HOT 2
- About the Release Date of New Versions HOT 2
- Slider Indicator Bigger Image Replacement on Press Event HOT 1
- "Does the lv_fs_dir_open function support opening directories with Chinese paths?" HOT 1
- ESP32 SPIFFS HOT 3
- animation LV_ANIM_REPEAT_INFINITE not works? HOT 1
- Overflow focus not handled correctly on full_refresh=0 HOT 1
- FPS and Fragmentation
- How to use evdev in v9? HOT 3
- Adding border to different sides HOT 1
- Lottile on web pages https://docs.lvgl.io/master/widgets/lottie.html ,there is no button to view the C code
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.