79523258

Date: 2025-03-20 14:34:55
Score: 2.5
Natty:
Report link

The reason you are not seeing the text correctly on the RGBA is that you did not define the colors correctly. The text() method's parameter fill expects an integer-valued tuple, so (0,0,0,1) would result in a nearly transparent color (0=fully transparent, 255=fully opaque). Try again with

font_color_bgra = (0,0,0,255)  # black

This should resolve your issue.

On the pure RGB image the alpha-component is not considered, thus you do not see the same error on the zebra background image.

enter image description here

Reasons:
  • Has code block (-0.5):
  • Me too answer (2.5): see the same error
  • Low reputation (0.5):
Posted by: André