Coder Social home page Coder Social logo

Comments (4)

embeddedt avatar embeddedt commented on May 27, 2024

Do you get the same performance loss if you create a basic lv_obj and position it on top of the image?

from lv_lib_png.

beckmx avatar beckmx commented on May 27, 2024

If I use a basic object, it does render faster like this one:

lv_obj_t * obj1;
    obj1 = lv_obj_create(lv_scr_act(), NULL);
    lv_obj_set_size(obj1, 100, 50);
    lv_obj_align(obj1, NULL, LV_ALIGN_CENTER, -60, -30);

The problem comes again, if I use another PNG image (extracted directly from flash as static) like this:

lv_obj_t * imgbtn1 = lv_imgbtn_create(lv_scr_act(), NULL);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_RELEASED, &icon_dinroom);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_PRESSED, &icon_dinroom);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_CHECKED_RELEASED, &icon_dinroom);
  lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_CHECKED_PRESSED, &icon_dinroom);
  lv_imgbtn_set_checkable(imgbtn1, true);
  // lv_obj_add_style(imgbtn1, LV_IMGBTN_PART_MAIN, &style);
  lv_obj_align(imgbtn1, NULL, LV_ALIGN_CENTER, 0, -40);

  /*Create a label on the Image button*/
  lv_obj_t * label = lv_label_create(imgbtn1, NULL);
  lv_label_set_text(label, "Button");

it kinda stops on the places where two PNG images are one on top of each other

from lv_lib_png.

kisvegabor avatar kisvegabor commented on May 27, 2024

Try LV_IMG_CACHE_DEF_SIZE 2 in lv_conf.h.

from lv_lib_png.

beckmx avatar beckmx commented on May 27, 2024

I decided to change the image to jpg instead, it was a little bit of slow

from lv_lib_png.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.