I have tried every format and settings in online converter - redo the picture to be sure the noise does not come from original picture, I use jpg because png rendering is not correct, like a blue filter on image.
If I use full transparent image (filled with transparent color) no noise, image is fully transparent =>ok
If I do not use transparent color, no noise but image of course has no transparency=>ok
Do I miss some settings ? Do I do something wrong ?
Or it is a bug with transparency ? Or with Online converter ?
I do not know where to look at, thanks for your help
By default when saving png Bit Depth was set to Auto-detect which bring random rendering depending on content: black image, blue image, etc, set 8 bits or 32 bits give same results, but looks like 24bits is ok, no noise, proper rendering.
Windows Paint does not give choice and seems ok out of the box.
I am not familiar with image settings, I was confused with LV_COLOR_DEPTH 16 so did not tried the 24bits.
One note about transparency, may be it is a known issue :
Using Theme will affect transparency rendering, for example using green as transparent color will stay green in image if Mono theme is used but will be transparent with default theme.
Well this is embarassing - it seems I am back to square 1 - issue I thought coming from theme, came in fact from conversion, even in normal theme transparency is not taken in account, (using new snap feature)
I enclose the original png file : logo.zip (2.5 KB)
and the converted file esplogo.c (1.5 MB)
/* Maximal horizontal and vertical resolution to support by the library.*/
#define LV_HOR_RES_MAX (480)
#define LV_VER_RES_MAX (320)
/* Color depth:
* - 1: 1 byte per pixel
* - 8: RGB233
* - 16: RGB565
* - 32: ARGB8888
#define LV_COLOR_DEPTH 16
/* Swap the 2 bytes of RGB565 color.
* Useful if the display has a 8 bit interface (e.g. SPI)*/
#define LV_COLOR_16_SWAP 0
/* 1: Enable screen transparency.
* Useful for OSD or other overlapping GUIs.
* Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
#define LV_COLOR_SCREEN_TRANSP 0
/*Images pixels with this color will not be drawn (with chroma keying)*/
#define LV_COLOR_TRANSP LV_COLOR_LIME
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 1
I am sure I was able to do transparency before, but not anymore
The difference is before I used external binary when now I use C array, I think.
Check that LV_COLOR_LIME has the same RGB value as the green pixels in your PNG file (using something like GIMP). It’s possible that they are slightly different shades of green. You might need to modify LV_COLOR_TRANSP appropriately.
The first pixel in the converted image has 0xe0, 0x07 value. It’s Little endian so the real value is 0x07, 0xe0. In binary 0000 0111 1110 000. In RGB565 R00000, G111111, B00000. So the converted image should be fine.
The chrome keying is handled here:
It should be worth some debugging to see what have happened.
Edit : I realize I misread chroma_key && px_color.full == disp->driver.color_chroma_key.full
should be : chroma_key && (px_color.full == disp->driver.color_chroma_key.full) to avoid confusion, but output is still meaninful
Let me know if you need me to add more info on debug