Home > Blockchain >  SetWindowIcon error: must be in R8G8B8A8 pixel format - raylib c
SetWindowIcon error: must be in R8G8B8A8 pixel format - raylib c

Time:01-07

So I am trying to make a window icon for the game and when I load the icon.png image, it says this: WARNING: GLFW: Window icon image must be in R8G8B8A8 pixel format and here is my icon: icon Finally, here is the code snippet:

Image icon = LoadImage("pong.png");
SetWindowIcon(icon);

Thanks for all answers!

CodePudding user response:

Your icon PNG has a bit depth of 24 which means it's missing the alpha channel (the A8 from R8G8B8A8).

Edit the image to save it with the alpha channel. You can check the bit depth in the file properties (should be 32 for RGBA).

  • Related