cancel
Showing results for 
Search instead for 
Did you mean: 

Fail to used L8 image

V.H
Senior

I used ImageMagick to change a image into 256 colors that I want to used L8_RGB565 image.

magick convert ***.png  -colors 256 ***_L8.png

But the TouchGFX compiler returned an error :

ERROR: Too many colors (762) for palette. Consider using RGB565.

ERROR: L8_RGB565 image assets/images/***_L8.png has too many colors for palette. Consider using RGB565.

ERROR: Could not generate image data

Has anyone encountered such a problem?

1 ACCEPTED SOLUTION

Accepted Solutions

I recommend pngnq: quantize png images - Linux Man Pages (1) (systutorials.com)

And for understand when your image is with alpha channel, then exist more combination 256 color and 256 alpha.

View solution in original post

5 REPLIES 5
V.H
Senior

Compile successfully when used 32-colors image, but the display is too poor.

Romain DIELEMAN
ST Employee

Hi,

Could you share the image you used ? Are you 100% sure it is in a RGB565 format ? (since there is that error message from the Image converter)

/Romain

Hi Romain Dieleman,

Glad to receive your reply, I need to used L8_RGB565 format and I uploaded the original image, L8 image, image config and error message.

I used ImageMagick APP to convert to a 256-color image, but TouchGFX prompts that the color of this image is out of range.

https://support.touchgfx.com/docs/development/ui-development/scenarios/using-the-l8-image-format-to-reduce-memory-consumption

I recommend pngnq: quantize png images - Linux Man Pages (1) (systutorials.com)

And for understand when your image is with alpha channel, then exist more combination 256 color and 256 alpha.

I found a solution to the problem: "Dither Algorithm" drop down choice "No dither".

Thanks for your help, your suggestion reminds me to check the image algorithm.