Save Screenshot in PNG format

I am trying to capture screenshot in panda3d program, but I was getting it by default in jpeg format
I then specified its format as png by this:
base.win.saveScreenShot (“image.png”)

But by doing so I am getting transparency issue and not getting expected screenshot (what I am getting is too bright screenshot with loss of many details)

Please suggest me some solution of this problem.

Try this:

base.movie(namePrefix=‘image’, duration=1, fps=1, format=‘png’)

1 Like

I think it’s just that Panda is also saving out the alpha channel. If you remove the alpha channel from the .png image you will no longer see this. You can also use the lower level screenshot functions to get the image as PNMImage and remove the alpha channel yourself before writing it out.