Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Question about Allegro's PNG support

This thread is locked; no one can reply to it. rss feed Print
Question about Allegro's PNG support
Frank Drebin
Member #2,987
December 2002
avatar

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:

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
avatar

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: