Why don't have a ImageFileFormatManager?


#1

just like AudioFormatManager ?
Because the juce is not complete yet , or I missed something?
Thanks…


#2

No particular reason. It’d mean creating a base class for image formats, etc, so would make things a bit more bloaty, and it’s not something I ever got around to. Are you trying to add your own image format?


#3

eh…not realy,Just curious.
And …So How to add my own image format?
THX


#4

Actually, here’s a slightly better answer than my first one:

With audio files, you need to provide the client with an AudioFormatReader object that it can keep hold of, which dynamically interacts with your audio file. With images, there’s no need for a client to even get anything like that, because it just says “load” and gets an image back. So I didn’t bother creating a set of virtual classes to handle each image format, as they don’t really need to ever be exposed to the client code.

This doesn’t allow adding your own format though, but since it’s probably your own code that does the loading anyway, just write your own image load function that can handle your special format.