Comments (13)
Maybe the image is slightly corrupted and full featured desktop viewers can handle it.
I suggest opening and saving the image. Hopefully it'll fixes it.
from lv_lib_png.
Maybe the image is slightly corrupted and full featured desktop viewers can handle it.
I suggest opening and saving the image. Hopefully it'll fixes it.
I thought about it, but unfortunaly not helped. I was able to draw image by disabling adler32 checking.
from lv_lib_png.
By the way errors 57 & 58 description tells that - (checking CRC can be disabled) / (checking ADLER32 can be disabled). So in lodepng.h may be added code like this
#ifdef LV_PNG_IGNORE_ADLER32
#define LODEPNG_IGNORE_ADLER32 1
#else
#define LODEPNG_IGNORE_ADLER32 0
#endif
#ifdef LV_PNG_IGNORE_CRC
#define LODEPNG_IGNORE_CRC 1
#else
#define LODEPNG_IGNORE_CRC 0
#endif
So in decompress initialization function may be used LODEPNG_IGNORE_CRC/LODEPNG_IGNORE_ADLER32 instead of 0/1. In this case we don't need edit sources to configure library.
from lv_lib_png.
I've just downloaded the image form your first post and it worked for me.
lodepng was update a couple of month ago. Do you use the latest version from the master branch?
from lv_lib_png.
I've just downloaded the image form your first post and it worked for me.
lodepng was update a couple of month ago. Do you use the latest version from the master branch?
I use lvgl_v7 as part of zephyr os. I made zephyr-module lv_lib_png based on commit 7ff6168.
As far as I understand later commits mades for lvgl_v8 which is incompatible with lvgl_v7
from lv_lib_png.
What if you overwrite lodepng.c/h
with the latest versions? There shouldn't be v8 related stuff there.
It might also worth a try to download the image from your post. Maybe GitHub converted it.
from lv_lib_png.
What if you overwrite
lodepng.c/h
with the latest versions? There shouldn't be v8 related stuff there.It might also worth a try to download the image from your post. Maybe GitHub converted it.
I'll try it. Thanks.
from lv_lib_png.
What if you overwrite
lodepng.c/h
with the latest versions? There shouldn't be v8 related stuff there.It might also worth a try to download the image from your post. Maybe GitHub converted it.
I tried latest version of lodepng.c. This file uses
lv_fs_seek(&f, 0, SEEK_END)
with 3 params (inside lodepng_filesize), while in lvgl_v7 it has only 2 params. So I use
lv_fs_size(&f, &size);
to detect size of file.
But file still not opened without disabling adler32 checking.
from lv_lib_png.
And have you downloaded the image from GitHub (from your first comment)?
from lv_lib_png.
And have you downloaded the image from GitHub (from your first comment)?
Yes. I tried with image downloaded from github.
In debugger
unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]);
called in lodepng_zlib_decompressv function gives me 0xC0C64FFD, while
unsigned checksum = adler32(out->data, (unsigned)(out->size));
gives 0xBF592DC8, out->size = 0x230
from lv_lib_png.
I have no idea 🙁
I've tested it again and out->size = 0x230
for me too but checksum = 0xc0c64ffd
.
from lv_lib_png.
I have no idea 🙁
I've tested it again and
out->size = 0x230
for me too butchecksum = 0xc0c64ffd
.
I founded a problem. I use custom allocator function, where lodepng_realloc was incorrect. Fixed by using lv_mem_realloc.
from lv_lib_png.
Glad to hear that!
from lv_lib_png.
Related Issues (20)
- Problem when using canvas on top of png HOT 4
- Some problems with imgbtn HOT 2
- bug with LODEPNG_COMPILE_ALLOCATORS option HOT 6
- how to enhance decoder's performance ? HOT 2
- PNG test on lv_port_stm32f429_disco HOT 9
- PNG photo 8 bitcolor someting wrong HOT 2
- memory allocation failed HOT 15
- png image not displayed properly HOT 3
- error: conflicting types for 'decoder_info' HOT 10
- image with alpha channel is broken HOT 12
- 'LV_PNG_USE_LV_FILESYSTEM' is never used? HOT 9
- Png picture distortion HOT 5
- free memory HOT 6
- How to enable key color when displaying PNG HOT 4
- how to make the background of image button to be transparent? HOT 2
- can't display the png img in vs2019 simulator HOT 2
- Lv_lib_png showing white rectangle HOT 11
- Does APNG support? HOT 4
- Load PNG from variable 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 lv_lib_png.