Png fails to load on iOS
Space cpp

I recently compiled libpng using the following xcode project:

Attempting to load a .png file always returns NULL, tried more than one file. Bmp loads fine through.
Also tested in both simulator and real device, no difference.

Ps: at first trying to build the app gave me an error:

Undefined symbols for architecture armv7:
"_png_init_filter_functions_neon", referenced from:

After a short google search I recompiled the library with this feature turned off. Could it be the reason?

Edgar Reynaldo

Uh, yeah. That's why. You need the image addon initialized and with png support built in during compilation. <o.o>

Space cpp

Found the solution.

In xcode project settings -> build settings there is "compress png files" and "remove text metadata from png files" both must be set to NO.

Thread #617250. Printed from