Skip to content

(python) Retrieving all file formats supported by OIIO #3780

Answered by MrLixm
MrLixm asked this question in Q&A
Discussion options

You must be logged in to vote

Never mind I found it 2minutes after opening this discussion by browsing the list of issues (#2901).

It seems I need to query an OIIO global attribute :

import OpenImageIO as oiio
oiio.get_string_attribute("extension_list")

That can then be converted to a dict like

import OpenImageIO as oiio
dict(
     [
         (extension.split(":")[0], extension.split(":")[1].split(","))
         for extension in oiio.get_string_attribute("extension_list").split(";")
     ]
 )

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MrLixm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant