Hey great video!, though not sure how your python code ran as the line r, g, b = img[j, i] gives an error of ValueError: too many values to unpack (expected 3) This can be fixed by using r,g,b,a = img[j, i]
@giovannicode9393
2 жыл бұрын
Hello! Some images can have an alpha value, so instead of RGB, it will be RGBA, so it depends on the used image. In my example, an image doesn't have an alpha value, so it worked without an error. When there's an alpha channel code should be modified as you suggested. I forget to mention the alpha channel, so thanks for pointing this out :)
@McMurchie
2 жыл бұрын
@@giovannicode9393 great work buddy
@theRealtensigh
2 жыл бұрын
I'm getting an error at line 21: "AttributeError: 'int' object has no attribute 'b'" Why doesn't it like b?
@giovannicode9393
2 жыл бұрын
Hi, try with different image. Also try swithching between line 20 (RGB) and line 21 (RGBA).
Пікірлер: 8