I know this is 5+ years old but I had trouble finding this for PyGI / PyGObject (3.22.0).
import gi.repository.GdkPixbuf as pixbuf
Then we can get all the formats using:
for f in pixbuf.Pixbuf.get_formats():
print f.get_name()
On my system (might be different on yours if you installed other loaders), I get:
- ani
- bmp
- GdkPixdata
- gif
- icns
- ico
- jpeg
- png
- pnm
- qtif
- svg
- tga
- tiff
- wmf
- xbm
- xpm
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…