Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARGB1555 and ARGB4444 support #19

Open
kisvegabor opened this issue Apr 26, 2022 · 18 comments
Open

ARGB1555 and ARGB4444 support #19

kisvegabor opened this issue Apr 26, 2022 · 18 comments
Labels
enhancement New feature or request

Comments

@kisvegabor
Copy link
Member

For 16 bit color depth + Alpha now only the non-standard ARGB8565 format can be used. I think it'd be great to support ARGB1555 and ARGB4444 in LVGL hence GPUs could accelerate the drawing of 16 bit ARGB images too.

So the question is how difficult would it be to add support for these formats in the converter?

If the converter supported them, I could quickly made them work in LVGL.

@embeddedt
Copy link
Member

Sure, I think I can add support for these very easily. One thing is unclear: currently the output format is dependent on LV_COLOR_DEPTH, so how do you want these formats to be selected?

@embeddedt embeddedt added the enhancement New feature or request label Apr 27, 2022
@embeddedt
Copy link
Member

@kisvegabor Bump - just wanted to make sure my response wasn't missed.

@kisvegabor
Copy link
Member Author

Sorry, I had some busy days.

currently the output format is dependent on LV_COLOR_DEPTH, so how do you want these formats to be selected?

Not always. E.g. indexed an alpha only images are exported as they are regardless to LV_COLOR_DEPTH. So I think we can list and handle these formats similarly to indexed and alpha only.

An other format request came up here. It short, in case of ARGB8565 images the pixels has 3 byte size which odd and slow to read. Instead we can have a special format for this where RGB565 pixels are written normally, and A8 pixels are written after them in the same array. We can use the image widdth/heigth to know where the alpha array starts. Can it be added with the other 2 format?

I think these names for the color format could work:

LV_IMG_CF_ARGB4444
LV_IMG_CF_ARGB1555
LV_IMG_CF_RGB565A8

@embeddedt
Copy link
Member

I've implemented support for the RGB565A8 format now. Let me know once support is added in LVGL and I will add a snapshot test so it never breaks (in theory).

@kisvegabor
Copy link
Member Author

I started to implement it, but it seems the RGB channel is always 0x00. I tested with this image
img_cogwheel_argb

@embeddedt
Copy link
Member

Fixed! Sorry about that; somehow I only managed to check the alpha channel during my read of the file.

@kisvegabor
Copy link
Member Author

No prole, thank for the fix. It's working now.

I'm implementing the transformation of rgb565-a8 image.

@kisvegabor
Copy link
Member Author

RGB565-A8 support is added here: https://github.com/lvgl/lvgl/tree/feat/rgb565a8

@GorgonMeducer
Copy link

GorgonMeducer commented May 16, 2022

Hi @embeddedt,
I am trying to test the newly added colour format RGB565-A8, and don't know how to use the converter. For this colour format, which option should I choose?

image

https://lvgl.io/tools/imageconverter

Thank you.

@embeddedt
Copy link
Member

You will need to use this link: https://lvgl.github.io/lv_img_conv/ until Gabor has a chance to update the main website. It should be the last color format in the list.

@kisvegabor
Copy link
Member Author

I just updated the version on lvgl.io

@GorgonMeducer
Copy link

Thank you. I found it.

@luka177
Copy link

luka177 commented May 22, 2022

Hi i a am not sure if regression is related to this update but seems so. https://lvgl.io/tools/imageconverter do not output true color binary anymore.

@embeddedt
Copy link
Member

@luka177 Could you let me know which settings you are using and what is the exact change in behavior? Thanks!

@luka177
Copy link

luka177 commented May 22, 2022

image
this settings. after clicking convert nothing happens.
debian-big
this is my image

@embeddedt
Copy link
Member

@luka177 Thanks, this was indeed a regression, sorry about that (there are no unit tests on that part of the code right now). Here is a link that should work till the website is updated again: https://lvgl.github.io/lv_img_conv/

@kisvegabor
Copy link
Member Author

I've updated the online converter too.

@luka177
Copy link

luka177 commented May 25, 2022

Thanks seems to work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants