Coder Social home page Coder Social logo

Development version for v9 about lv_img_conv HOT 10 OPEN

lvgl avatar lvgl commented on May 23, 2024
Development version for v9

from lv_img_conv.

Comments (10)

embeddedt avatar embeddedt commented on May 23, 2024

Sure, I can make these changes. To clarify, the main difference I'm seeing is that there are now options that expose each of the internal color formats (RGB565, RGB888, ARGB8888) which were previously not possible to set directly at all (they were simply forced based on the system's LV_COLOR_DEPTH).

As I understand it these types of previously internal options should now be possible to choose manually in addition to the automated selection via LV_COLOR_FORMAT_NATIVE. Is that correct?

I was also confused whether Native ARGB should be a top-level option to choose as well or if that was just included for the purposes of the explanation, since you mentioned "for ARGB images there is no common define which is resolved".

from lv_img_conv.

kisvegabor avatar kisvegabor commented on May 23, 2024

Sure, I can make these changes.

Amazing, thank you!

As I understand it these types of previously internal options should now be possible to choose manually in addition to the automated selection via LV_COLOR_FORMAT_NATIVE. Is that correct?

Yes, it's correct 🙂

I was also confused whether Native ARGB should be a top-level option to choose as well or if that was just included for the purposes of the explanation, since you mentioned "for ARGB images there is no common define which is resolved".

In the weekend I was thinking about it and I found that actually we can add a LV_COLOR_FORMAT_NATIVE_WITH_ALPHA option which will be resolved to AL88, RGB565A8 or ARGB8888.

It means that we should have AL88 support too.
Note that L8 is the brightness of the pixel calculated as 0.2126*R + 0.7152*G + 0.0722*B.

I've added AL88 to the list.

from lv_img_conv.

embeddedt avatar embeddedt commented on May 23, 2024

I've pushed a WIP version of this to dev. It's turned out to be significantly more work than I anticipated, as I have been working on it slowly and the refactoring was also more extensive than I first understood. 😆

Current state of affairs:

  • Most of the renames should be done (this was straightforward).
  • There is no support for converting individual formats yet. The current converter logic was hardcoded to generate the special sub-formats when the top-level true color format is provided, so I need to think of a clean way to untangle that logic.
  • The special LV_COLOR_FORMAT_XXX_CHROMA_KEYED options are not supported yet.
  • I have not tested whether the resulting image actually compiles with LVGL v9.
  • The web converter UI still uses the old color format names.

To test it it should be enough to checkout the dev branch and run npm start.

from lv_img_conv.

kisvegabor avatar kisvegabor commented on May 23, 2024

Take your time! It'd help to test things, but not a blocking thing at thins moment. 🙂

I've tried out a few things and here i what I found:

  • LV_IMG_PX_SIZE_ALPHA_BYTE was removed but I added _LV_COLOR_NATIVE_WITH_ALPHA_SIZE.
  • In case of NATIVE_ALPHA 16 bit doesn't use the RGB565A8 format
  • LV_COLOR_16_SWAP is also removed

from lv_img_conv.

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.