OpenImageIO
OpenImageIO copied to clipboard
[FEATURE REQUEST]Make image format autodetection work with IOProxy/IOMemBuffer
Is your feature request related to a problem? Please describe. When reading a texture file with OIIO, it is able to find the correct image reader if the extension is missing (I believe by testing all plugins, but this could be detected with magic numbers). When reading an image from an IOMemBuffer or a custom IOProxy, this doesn't work, the ImageCache file name must contain the proper extension or it won't load the file, with error messages:
Shader error [colorshader_texture]: Invalid image file "A6283DE8-F912-B0C8-04AC-D34B8265F2A9": Image "A6283DE8-F912-B0C8-04AC-D34B8265F2A9" does not exist. Also, it is not the name of an image format that OpenImageIO recognizes.
Describe the solution you'd like It would be useful if format detection could work also in this case.
Describe alternatives you've considered Currently I have find the format from first bytes (magic numbers) and add the extension to texture names (which are GUIDs in my case)
You're right. I'm working on this.
Did you see my patch? It’s actually simple since libjpeg lets you set custom IO callbacks.
Le lun. 13 avr. 2020 à 19:31, Larry Gritz [email protected] a écrit :
You're right. I'm working on this.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenImageIO/oiio/issues/2550#issuecomment-613002981, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXIPYKQ67M6WWR4UEJGLBDRMND7VANCNFSM4MGAF5LA .
Patch? Did I miss something?
Ah sorry, I was thinking about another feature request : https://github.com/OpenImageIO/oiio/issues/2545
Le lun. 13 avr. 2020 à 23:44, Larry Gritz [email protected] a écrit :
Patch? Did I miss something?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenImageIO/oiio/issues/2550#issuecomment-613112961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXIPYKSHWLCZ6Q63GFJ66DRMOBUVANCNFSM4MGAF5LA .