mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
pngcp: tool to copy PNG files
This adds pngcp to the build together with a pngcp.dfa configuration test; the test revealed some configuration bugs which are fixed by corrections to the _SUPPORTED macros. pngcp builds on all tested configurations and a number of bugs have been fixed to make this happen relative to the version in libpng 1.7 contrib/examples. pngcp.dfa will have to be different for 1.7 but pngcp.c should work fine (not yet tested). pngcp itself is still missing a usage message; this is a preliminary version, although since it behaves the same way as 'cp' most unoids shouldn't have a problem using it correctly. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
46
contrib/conftest/pngcp.dfa
Normal file
46
contrib/conftest/pngcp.dfa
Normal file
@@ -0,0 +1,46 @@
|
||||
# pngcp.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2016
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng with support for pngcp. This means just png_read_png,
|
||||
# png_write_png and small number of configuration settings.
|
||||
#
|
||||
everything = off
|
||||
|
||||
# Options to turn on png_read_png and png_write_png:
|
||||
option INFO_IMAGE on
|
||||
option SEQUENTIAL_READ on
|
||||
option EASY_ACCESS on
|
||||
option WRITE on
|
||||
option WRITE_16BIT on
|
||||
option WRITE_FILTER on
|
||||
|
||||
# pngcp needs this to preserve unknown chunks, switching all these on means that
|
||||
# pngcp can work without explicit known chunk reading suppport
|
||||
option UNKNOWN_CHUNKS on
|
||||
option SET_UNKNOWN_CHUNKS on
|
||||
option HANDLE_AS_UNKNOWN on
|
||||
option SAVE_UNKNOWN_CHUNKS on
|
||||
option WRITE_UNKNOWN_CHUNKS on
|
||||
|
||||
# pngcp needs this to handle palette files with invalid indices:
|
||||
option CHECK_FOR_INVALID_INDEX on
|
||||
option GET_PALETTE_MAX on
|
||||
|
||||
# Pre-libpng 1.7 pngcp has to stash text chunks manually, post 1.7 without this
|
||||
# text chunks should be handled as unknown ok.
|
||||
option TEXT on
|
||||
|
||||
# this is used to turn off limits:
|
||||
option USER_LIMITS on
|
||||
option SET_USER_LIMITS on
|
||||
|
||||
# these are are just required for specific customizations
|
||||
option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
|
||||
option WRITE_CUSTOMIZE_COMPRESSION on
|
||||
Reference in New Issue
Block a user