Skip to content

Commit

Permalink
fix lvgl img
Browse files Browse the repository at this point in the history
  • Loading branch information
pikasTech committed Feb 24, 2024
1 parent ec7fde3 commit dbd16d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions package/pika_lvgl/pika_lvgl_lv_wegit.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,7 @@ void pika_lvgl_img_set_size_mode(PikaObj* self, int mode) {

void pika_lvgl_img_dsc_t___init__(PikaObj* self, PikaObj* dsc_dict) {
obj_setRef(self, "dsc_dict", dsc_dict);
PikaDict* dsc_dict_ = obj_getPtr(dsc_dict, "dict");
uint8_t* data = pikaDict_getBytes(dsc_dict_, "data");
uint8_t* data = pikaDict_getBytes(dsc_dict, "data");
unsigned char wtmp[4] = {'0'};
unsigned char htmp[4] = {'0'};
memcpy(&wtmp, data + 16, 4);
Expand All @@ -769,7 +768,7 @@ void pika_lvgl_img_dsc_t___init__(PikaObj* self, PikaObj* dsc_dict) {
int h = ((int)(unsigned char)htmp[2]) * 256 + (int)(unsigned char)htmp[3];
lv_img_dsc_t img_dsc = {
.data = data,
.data_size = pikaDict_getInt(dsc_dict_, "data_size"),
.data_size = pikaDict_getInt(dsc_dict, "data_size"),
.header =
{
.always_zero = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/PikaVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#define PIKA_VERSION_MINOR 13
#define PIKA_VERSION_MICRO 2

#define PIKA_EDIT_TIME "2024/02/25 00:24:24"
#define PIKA_EDIT_TIME "2024/02/25 01:45:50"

0 comments on commit dbd16d5

Please sign in to comment.