Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes pertaining background color and grayscale conversions #270

Open
wants to merge 2 commits into
base: libpng16
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ set(pngunknown_sources
set(pngimage_sources
contrib/libtests/pngimage.c
)
set(pngadhoc_sources
contrib/libtests/pngadhoc.c
)
set(pngfix_sources
contrib/tools/pngfix.c
)
Expand Down Expand Up @@ -745,6 +748,10 @@ if(PNG_TESTS AND PNG_SHARED)

png_add_test(NAME pngimage-quick COMMAND pngimage OPTIONS --list-combos --log FILES ${PNGSUITE_PNGS})
png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${PNGSUITE_PNGS})

add_executable(pngadhoc ${pngadhoc_sources})
target_link_libraries(pngadhoc png)
png_add_test(NAME pngadhoc COMMAND pngadhoc)
endif()

if(PNG_SHARED)
Expand Down
8 changes: 6 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
ACLOCAL_AMFLAGS = -I scripts

# test programs - run on make check, make distcheck
check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp
check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp pngadhoc
if HAVE_CLOCK_GETTIME
check_PROGRAMS += timepng
endif
Expand Down Expand Up @@ -56,6 +56,9 @@ png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
pngcp_SOURCES = contrib/tools/pngcp.c
pngcp_LDADD = libpng@PNGLIB_MAJOR@@[email protected]

pngadhoc_SOURCES = contrib/libtests/pngadhoc.c
pngadhoc_LDADD = libpng@PNGLIB_MAJOR@@[email protected]

# Generally these are single line shell scripts to run a test with a particular
# set of parameters:
TESTS =\
Expand All @@ -75,7 +78,7 @@ TESTS =\
tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\
tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
tests/pngimage-quick tests/pngimage-full
tests/pngimage-quick tests/pngimage-full tests/pngadhoc

# man pages
dist_man_MANS= libpng.3 libpngpf.3 png.5
Expand Down Expand Up @@ -244,6 +247,7 @@ contrib/libtests/pngstest.o: pnglibconf.h
contrib/libtests/pngunknown.o: pnglibconf.h
contrib/libtests/pngimage.o: pnglibconf.h
contrib/libtests/pngvalid.o: pnglibconf.h
contrib/libtests/pngadhoc.o: pnglibconf.h
contrib/libtests/readpng.o: pnglibconf.h
contrib/libtests/tarith.o: pnglibconf.h
contrib/libtests/timepng.o: pnglibconf.h
Expand Down
33 changes: 29 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ build_triplet = @build@
host_triplet = @host@
check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \
pngstest$(EXEEXT) pngvalid$(EXEEXT) pngimage$(EXEEXT) \
pngcp$(EXEEXT) $(am__EXEEXT_1)
pngcp$(EXEEXT) pngadhoc$(EXEEXT) $(am__EXEEXT_1)
@HAVE_CLOCK_GETTIME_TRUE@am__append_1 = timepng
bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT)
@PNG_ARM_NEON_TRUE@am__append_2 = arm/arm_init.c\
Expand Down Expand Up @@ -240,6 +240,9 @@ pngunknown_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
am_pngvalid_OBJECTS = contrib/libtests/pngvalid.$(OBJEXT)
pngvalid_OBJECTS = $(am_pngvalid_OBJECTS)
pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
am_pngadhoc_OBJECTS = contrib/libtests/pngadhoc.$(OBJEXT)
pngadhoc_OBJECTS = $(am_pngadhoc_OBJECTS)
pngadhoc_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
am_timepng_OBJECTS = contrib/libtests/timepng.$(OBJEXT)
timepng_OBJECTS = $(am_timepng_OBJECTS)
timepng_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
Expand Down Expand Up @@ -274,6 +277,7 @@ am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \
contrib/libtests/$(DEPDIR)/pngstest.Po \
contrib/libtests/$(DEPDIR)/pngunknown.Po \
contrib/libtests/$(DEPDIR)/pngvalid.Po \
contrib/libtests/$(DEPDIR)/pngadhoc.Po \
contrib/libtests/$(DEPDIR)/timepng.Po \
contrib/tools/$(DEPDIR)/png-fix-itxt.Po \
contrib/tools/$(DEPDIR)/pngcp.Po \
Expand Down Expand Up @@ -317,12 +321,14 @@ SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
$(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \
$(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \
$(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES)
$(pngunknown_SOURCES) $(pngvalid_SOURCES) $(pngadhoc_SOURCES) \
$(timepng_SOURCES)
DIST_SOURCES = \
$(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \
$(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \
$(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \
$(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES)
$(pngunknown_SOURCES) $(pngvalid_SOURCES) $(pngadhoc_SOURCES) \
$(timepng_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
Expand Down Expand Up @@ -732,6 +738,8 @@ pngfix_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
pngcp_SOURCES = contrib/tools/pngcp.c
pngcp_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
pngadhoc_SOURCES = contrib/libtests/pngadhoc.c
pngadhoc_LDADD = libpng@PNGLIB_MAJOR@@[email protected]

# Generally these are single line shell scripts to run a test with a particular
# set of parameters:
Expand All @@ -752,7 +760,7 @@ TESTS = \
tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\
tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
tests/pngimage-quick tests/pngimage-full
tests/pngimage-quick tests/pngimage-full tests/pngadhoc


# man pages
Expand Down Expand Up @@ -1069,6 +1077,12 @@ contrib/libtests/pngvalid.$(OBJEXT): contrib/libtests/$(am__dirstamp) \
pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES) $(EXTRA_pngvalid_DEPENDENCIES)
@rm -f pngvalid$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS)
contrib/libtests/pngadhoc.$(OBJEXT): contrib/libtests/$(am__dirstamp) \
contrib/libtests/$(DEPDIR)/$(am__dirstamp)

pngadhoc$(EXEEXT): $(pngadhoc_OBJECTS) $(pngadhoc_DEPENDENCIES) $(EXTRA_pngadhoc_DEPENDENCIES)
@rm -f pngadhoc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pngadhoc_OBJECTS) $(pngadhoc_LDADD) $(LIBS)
contrib/libtests/timepng.$(OBJEXT): contrib/libtests/$(am__dirstamp) \
contrib/libtests/$(DEPDIR)/$(am__dirstamp)

Expand Down Expand Up @@ -1151,6 +1165,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngstest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngunknown.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngvalid.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngadhoc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/timepng.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@contrib/tools/$(DEPDIR)/png-fix-itxt.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@contrib/tools/$(DEPDIR)/pngcp.Po@am__quote@ # am--include-marker
Expand Down Expand Up @@ -1809,6 +1824,13 @@ tests/pngimage-full.log: tests/pngimage-full
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tests/pngadhoc.log: tests/pngadhoc
@p='tests/pngadhoc'; \
b='tests/pngadhoc'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
Expand Down Expand Up @@ -2088,6 +2110,7 @@ distclean: distclean-am
-rm -f contrib/libtests/$(DEPDIR)/pngstest.Po
-rm -f contrib/libtests/$(DEPDIR)/pngunknown.Po
-rm -f contrib/libtests/$(DEPDIR)/pngvalid.Po
-rm -f contrib/libtests/$(DEPDIR)/pngadhoc.Po
-rm -f contrib/libtests/$(DEPDIR)/timepng.Po
-rm -f contrib/tools/$(DEPDIR)/png-fix-itxt.Po
-rm -f contrib/tools/$(DEPDIR)/pngcp.Po
Expand Down Expand Up @@ -2173,6 +2196,7 @@ maintainer-clean: maintainer-clean-am
-rm -f contrib/libtests/$(DEPDIR)/pngstest.Po
-rm -f contrib/libtests/$(DEPDIR)/pngunknown.Po
-rm -f contrib/libtests/$(DEPDIR)/pngvalid.Po
-rm -f contrib/libtests/$(DEPDIR)/pngadhoc.Po
-rm -f contrib/libtests/$(DEPDIR)/timepng.Po
-rm -f contrib/tools/$(DEPDIR)/png-fix-itxt.Po
-rm -f contrib/tools/$(DEPDIR)/pngcp.Po
Expand Down Expand Up @@ -2300,6 +2324,7 @@ contrib/libtests/pngstest.o: pnglibconf.h
contrib/libtests/pngunknown.o: pnglibconf.h
contrib/libtests/pngimage.o: pnglibconf.h
contrib/libtests/pngvalid.o: pnglibconf.h
contrib/libtests/pngadhoc.o: pnglibconf.h
contrib/libtests/readpng.o: pnglibconf.h
contrib/libtests/tarith.o: pnglibconf.h
contrib/libtests/timepng.o: pnglibconf.h
Expand Down
Loading