New LibPNG API goodness
BlitzMax Forums/BlitzMax Programming/New LibPNG API goodness
| ||
The new (1.6+) libpng apis allow you to prefix png function names with text of your choice. This could make for mixing up different image libraries in BlitzMax so much better, as each could use their own prefix. No more clashing function calls, and no more crashing. Sounds good to me. (or more likely, I'll update my mods in the future and BlitzMax will stay the same). |
| ||
Sure avoiding clashes is a nice thing, but in general I more like the approach: call a function and get the best in return. In general I wont enjoy having to worry about "which function do I have to use now". I like the approach of the libraries in linux: DrawImage calls the most current DrawImage DrawImage12 calls the v1.2 version and so on. bye Ron |
| ||
The way libpng does it is via #defines, so the function names that you use in your code are actually in uppercase. Depending on what version of the library API you built against would define which API your app would use (i.e. the latest matching API) |
| ||
Could this be added to the bmx core modules? Or would we need a full new library (extrernal dll file) for each function in order to get a simple update. |
| ||
And this is what happens when you try to mix the same API with different versions…(maxide.debug:3072): Gtk-WARNING **: Error loading icon: Failed to load image '/usr/share/icons/oxygen/16x16/actions/application-exit.png': Fatal error in PNG image file: Incompatible libpng version in application and library cool :-/ |
| ||
Fatal! :/ |