I have two png images and if i try to open them (here is the code)
from PIL import Image
x = Image.open('png/x-tictactoe.png')
o = Image.open('png/o-tictactoe.png')
print(x)
print(o)
The first line opens the image normally as png, while the second line one automatically opens the image as jpeg
Here is the output:
"C:\Users\Delfino De Chicchis\PycharmProjects\TicTacToe\venv\Scripts\python.exe" "C:/Users/Delfino De Chicchis/PycharmProjects/TicTacToe/test.py"
<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=860x898 at 0x27FA46330A0>
<PIL.JpegImagePlugin.JpegImageFile image mode=L size=880x1004 at 0x27FA67E8C10>
Process finished with exit code 0
I just want to open both files as png, in order to use RGBA to make transparent background.
Someone could help me please?