"test-png" tool to find PNGs that cause warnings

New tool, "test-png", which exercises libpng library on
a set of PNG image files, allowing us to find those which
cause Tux Paint (via SDL_image, in turn via libpng) to
report back warnings to STDERR.

h/t Tim Dickson, per https://sourceforge.net/p/tuxpaint/bugs/252/
This commit is contained in:
Bill Kendrick 2022-07-03 17:18:58 -07:00
parent 844db56ab9
commit 06fafcb6d6
4 changed files with 112 additions and 1 deletions

View file

@ -4,7 +4,7 @@
# Various contributors (see AUTHORS.txt)
# http://www.tuxpaint.org/
# June 14, 2002 - June 29, 2022
# June 14, 2002 - July 3, 2022
# The version number, for release:
@ -315,6 +315,9 @@ NOSVGFLAG:=$(if $(SVG_LIB),,-DNOSVG$(warning No SVG for you!))
OLDSVGFLAG:=$(if $(filter -lsvg-cairo,$(SVG_LIB)),-DOLD_SVG,)
PNG_CFLAGS:=$(shell $(PKG_CONFIG) libpng --cflags)
ifeq ($(hack),1)
hack:
@echo 'SDL_PANGO_LIB is' $(SDL_PANGO_LIB)
@ -715,6 +718,7 @@ clean:
@-rm -f TuxPaint.dmg temp.dmg; rm -rf magic/*.dSYM Resources
@-rm -f dlllist a.exe
@-rm -f win32/Preprocessed.iss win32/tuxpaint-*.zip win32/tuxpaint-*.exe
@-rm -f test-png
@echo
# "make uninstall" should remove the various parts from their
@ -1400,3 +1404,7 @@ $(MAGIC_SO): magic/%.$(SO_TYPE): magic/src/%.c
.PHONY: magic-plugins
magic-plugins: src/tp_magic_api.h $(MAGIC_SO)
test-png: src/test-png.c
$(CC) $(PNG_CFLAGS) src/test-png.c -o test-png $(PNG)