|
Question about Allegro's PNG support |
Frank Drebin
Member #2,987
December 2002
|
Hi guys - or should I say Hi Edgar who is probably the first one to answer ;-) when it comes to support of different image formats the manual says: Allegro Manual said: The following types are built into the Allegro image addon and guaranteed to be available: BMP, DDS, PCX, TGA. Every platform also supports JPEG and PNG via external dependencies. I just want to know the meaning of the second sentence. Does this mean that it is guaranteed that JPEG and PNG will work on every platform or does this mean that JPEG and PNG is supported only if external dependencies are available which you'll never know? |
Polybios
Member #12,293
October 2010
|
It depends on whether you include / link the required libraries (e.g. libpng), or rather whether your Allegro build does that. As the libraries are available for every platform Allegro supports (AFAIK), you can always include / link them when building Allegro. Usually, you provide them along with your executable in binary form (e.g. DLLs) or, even better, just statically link them into your application's binary. So the sentence you refer to just means that Allegro devs have not taken the effort to reimplement custom loading of image formats for which there are libraries available that are portable and widely used. Rather, Allegro uses these libraries to accomplish the task. Their availability is, however, a build-time, not a run-time issue. |
Frank Drebin
Member #2,987
December 2002
|
Thanks - great explanation! |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Haha, I have no life. To add to what PolyBios said, the build time support is controlled in CMake by the WANT_PNG cmake variable. So you can pass -DWANT_PNG=On or enable it in cmake-gui. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|