Yes there is. Look under the Translation Kit in the Be Book. The best way (IMO) to just load an image and get on with things is to include TranslationUtils.h and call BTranslationUtils::LoadBitmapFile().
It depends on what translators are installed. Haiku currently has translators for BMP, GIF, JPG, JPEG2000, PNG, PPM, SGI, TGA and TIFF images. BeOS probably has a similar list, plus there are more which can be installed from BeBits.
Is it installed by default on all version of the operating system ?
What are the file format which are installed on 100% of BeOS and Haiku ?
I want to use a library which is available on every operating system (even if it only support .bmp). i don’t want someting which depends on other things like it’s the case for Linux. I am interested on Haiku because i want a free operating system and i hate all the dependencies of Linux.
The Translation Kit, which comes as libtranslation.so library is installed and available on 100% of BeOS compatible system: BeOS, Zeta, Haiku.
So you should not worry about your program being able to use this system library.
But alone this library does nothing helpfull. It needs “translator” add-ons to offer and do the actual data translation (as this kit is not limited only to “image” data…). The builtin image translator add-ons list is not exactly the same on each system, but I guess you could bet that BMP, TIF, TGA & JPG are always available among them.
I don’t remember if PNG was a default translator in BeOS R5, but if it was not I’ll bet that since old R5 days every user that still use BeOS, Zeta or (how fool! ;-)) Haiku have installed it.
Philippe Houdoin, occasional OpenGL & Networking team leader