Updated name to cPNG + creation of automatic link with cZlib

This commit is contained in:
Sylvain PILLOT 2022-08-30 10:27:49 +02:00
parent 8e0d4a3ddb
commit 3274c6d97c
10 changed files with 46 additions and 404 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/build-cg
/build-fx

View File

@ -1,6 +1,8 @@
#cPNG source files
cmake_minimum_required(VERSION 3.16)
project(Libcpng VERSION 1.5.30 LANGUAGES C)
project(cPNG VERSION 1.5.30 LANGUAGES C)
find_package(Gint 2.9.0 REQUIRED)
find_package(cZlib 1.2.5 REQUIRED)
set(SOURCES
png.c
@ -19,25 +21,19 @@ set(SOURCES
pngwtran.c
pngwutil.c
)
include_directories(
"${PROJECT_SOURCE_DIR}"
"${PROJECT_BINARY_DIR}/include"
"${FXSDK_INCLUDE}")
add_compile_options(-Os -lm -m4-nofpu -mb -std=c11 -lczlib -ffreestanding -nostdlib -Wa,--dsp)
# Target name is "czlib", output file is "libcPNG.a" (by default)
# Target name is "cPNG", output file is "libcPNG.a" (by default)
add_library(cPNG STATIC ${SOURCES})
target_compile_options(cPNG PRIVATE -Os -std=c11 -lcZlib)
# After building, install the target (that is, cPNG.a) in the compiler
install(TARGETS cPNG
DESTINATION "${FXSDK_LIB}")
# Install png.h from the build dir
install(FILES "${PROJECT_SOURCE_DIR}/png.h"
DESTINATION "${FXSDK_INCLUDE}")
# Install pngconf.h from the build dir
install(FILES "${PROJECT_SOURCE_DIR}/pngconf.h"
DESTINATION "${FXSDK_INCLUDE}")
# Install pnglibconf.h from the build dir
install(FILES "${PROJECT_SOURCE_DIR}/pnglibconf.h"
install(FILES png.h pngconf.h pnglibconf.h
DESTINATION "${FXSDK_INCLUDE}")
# Install FindcPNG.cmake so that users can do find_package(LibcPNG)
install(FILES cmake/FindcPNG.cmake
DESTINATION "${FXSDK_CMAKE_MODULE_PATH}")

View File

@ -1,40 +0,0 @@
INCLUDE = -I./include -I/home/sylvain/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include/openlibm/
CFLAGS = -O2 $(INCLUDE) -lczlib -lm -m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp -DPNG_NO_FLOATING_ARITHMETIC -DPNG_NO_WRITE_SUPPORTED -DPNG_SETJMP_NOT_SUPPORTED -DPNG_WRITE_TRANSFORMS_NOT_SUPPORTED -DPNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED -DPNG_NO_SAVE_UNKNOWN_CHUNKS -DPNG_NO_FLOATING_POINT -DPNG_NO_USER_MEM_SUPPORTED -DPNG_NO_TIME_RFC1123 -DPNG_NO_IO_STATE_SUPPORTED -DPNG_NO_USER_LIMITS_SUPPORTED
AR = sh-elf-gcc-ar
RANLIB = sh-elf-gcc-ranlib
CC = sh-elf-gcc
CONFIG_H = config.h
TARGET = libcPNG.a
SOURCES = \
png.c \
pngerror.c \
pngget.c \
pngmem.c \
pngpread.c \
pngread.c \
pngrio.c \
pngrtran.c \
pngrutil.c \
pngset.c \
pngtrans.c \
pngwio.c \
pngwrite.c \
pngwtran.c \
pngwutil.c
OBJECTS = $(SOURCES:.c=.o)
all: $(TARGET)
$(TARGET): $(OBJECTS)
#cp $(CONFIG_H).default $(CONFIG_H)
$(AR) cr $@ $^
$(RANLIB) $@
.c.o:
$(CC) $(INCLUDE) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)

View File

@ -1,25 +1,28 @@
# libPNG 1.5.30 repository for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E)
# Library cPNG 1.5.30 repository for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E)
Need to have a fully working gcc toolchain for SH3/SH4 architecture, such as fxSDK
Need to have a fully working gcc toolchain for SH3/SH4 architecture.
**Note:** libPNG requires Zlib available, so the very first step is to get that library available and working prior to libPNG. You can get a working Zlib for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E) here : [libZlib for PRIZM](https://gitea.planet-casio.com/Slyvtt/cZlib1_2_5)
**Note:** libcPNG requires cZlib available, so the very first step is to get that library available and working prior to libcPNG.
You can get a working Zlib for CASIO fx-CG 10/20 (a.k.a. PRIZM) and fx-CG 50 (or Graph 90+E) here : [libcZlib for PRIZM](https://gitea.planet-casio.com/Slyvtt/cZlib)
## Automatic installation using giteapc
You can also use the `gitea install Slyvtt/cPNG1_5_30` command to get an automatic install
when you compile a program for use with libPNG, do not forget to add a `-lcPNG -lczlib` option in your compilator command line.
and then a `#include <png.h>` in your C/C++ sources
You can use the `giteapc install Slyvtt/cPNG` command to get an automatic install
## Manual compilation using a Makefile
## Using in a program
Compilation is done by using the adhoc Makefile :
`make -f Makefile.prizm` in the main directory
With CMake
It should produce the library libcPNG.a and copy everything in the right place.
```cmake
find_package(cPNG 1.5.30 REQUIRED)
target_link_libraries(<TARGET> PRIVATE cPNG::cPNG)
```
The following steps are not automatically done, so please proceed with the following manipulations :
With make, the following steps are not automatically done, so please proceed with the following manipulations :
* copy the library `libcPNG.a` into your SH3/SH4 compiler lib folder
* copy `png.h`, `pngconf.h` and `pnglibconf.h` files contained in the include folder into the include folder of the SH3/SH4 compiler
* link with `-lcPNG -lcZlib`
In the C/C++ sources `#include <png.h>`

6
build
View File

@ -1,6 +0,0 @@
make -f Makefile.prizm clean
make -f Makefile.prizm
cp libcPNG.a ~/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/
cp ./png.h ~/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include
cp ./pngconf.h ~/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include
cp ./pnglibconf.h ~/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="cPNG1_5_30" />
<Option pch_mode="2" />
<Option compiler="null" />
<Build>
<Target title="Release">
<Option output="bin/Release/cPNG1_5_30" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="null" />
</Target>
</Build>
<Unit filename="Makefile.prizm" />
<Unit filename="config.h" />
<Unit filename="example.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="png.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="png.h" />
<Unit filename="pngconf.h" />
<Unit filename="pngdebug.h" />
<Unit filename="pngerror.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngget.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pnginfo.h" />
<Unit filename="pnglibconf.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pnglibconf.h" />
<Unit filename="pngmem.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngpread.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngpriv.h" />
<Unit filename="pngread.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngrio.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngrtran.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngrutil.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngset.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngstruct.h" />
<Unit filename="pngtest.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngtrans.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngwio.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngwrite.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngwtran.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="pngwutil.c">
<Option compilerVar="CC" />
</Unit>
<Extensions />
</Project>
</CodeBlocks_project_file>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="png.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13026" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -1,49 +1,18 @@
find_package(Gint 2.7 REQUIRED)
# Find libexample.a; if we had platform-specific versions we could look for
# libexample-${FXSDK_PLATFORM}.a instead.
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=libcPNG.a
OUTPUT_VARIABLE EX_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
# EX_PATH is now the full path if libustl.a exists, "libustl.a" otherwise
if(NOT "${EX_PATH}" STREQUAL "libcPNG.a")
# Find the version.h header
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=include/pngconf.h
OUTPUT_VARIABLE EX_CONFIG OUTPUT_STRIP_TRAILING_WHITESPACE)
# Extract version information from the config.h header. This command prints
# the version on the line matching the regex and deletes every other line.
execute_process(
COMMAND sed -E "s/#define.*EX_VERSION\\s+\"(\\S+)\"$/\\1/p; d" ${EX_CONFIG}
OUTPUT_VARIABLE EX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# The commands above seem common for gint libraries, so the fxSDK provides a
# helper function to get that directly. We simply provide the archive name,
# header file name, macro name, and names for output variables.
# include(FindSimpleLibrary)
# find_simple_library(libexample.a include/example/config.h "EX_VERSION"
# PATH_VAR EX_PATH VERSION_VAR EX_VERSION)
# This CMake utility will handle the version comparisons and other checks. We
# just specify:
# -> Some variables that are defined only if the library is found (so if
# they're undefined, CMake will conclude libexample was not found)
# -> The version, so CMake can compare with the user's requested one
include(FindSimpleLibrary)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libcPNG
REQUIRED_VARS EX_CONFIG EX_VERSION
VERSION_VAR EX_VERSION)
# We now have a LibExample_FOUND variable, let's create the target that users
# can link against with target_link_libraries()
if(LibcPNG_FOUND)
# This is an imported target, we don't build it, we just claim it's here
add_library(libcPNG::libcPNG UNKNOWN IMPORTED)
# Here we declare the compiler and linker flags that every user of LibExample
# needs to use.
set_target_properties(libcPNG::libcPNG PROPERTIES
# If we specify where the library comes from, CMake will watch that file
# and relink any user application when the library is updated!
IMPORTED_LOCATION "${EX_PATH}"
# Linking options
find_simple_library(libcPNG.a png.h "PNG_LIBPNG_VER_STRING"
PATH_VAR CPNG_PATH
VERSION_VAR CPNG_VERSION)
find_package_handle_standard_args(cPNG
REQUIRED_VARS CPNG_PATH CPNG_VERSION
VERSION_VAR CPNG_VERSION)
if(cPNG_FOUND)
add_library(cPNG::cPNG UNKNOWN IMPORTED)
set_target_properties(cPNG::cPNG PROPERTIES
IMPORTED_LOCATION "${CPNG_PATH}"
INTERFACE_LINK_OPTIONS -lcPNG
# Dependencies (for order on the command-line)
IMPORTED_LINK_INTERFACE_LIBRARIES Gint::Gint -lczlib)
IMPORTED_LINK_INTERFACE_LIBRARIES Gint::Gint -lcZlib)
endif()

View File

@ -1,26 +1,20 @@
# giteapc: version=1 depends=Lephenixnoir/gint,Lephenixnoir/sh-elf-gcc,Lephenixnoir/fxsdk,Lephenixnoir/OpenLibm,Vhex-Kernel-Core/fxlibc
# giteapc: version=1 depends=Lephenixnoir/gint,Lephenixnoir/sh-elf-gcc,Lephenixnoir/fxsdk,Lephenixnoir/OpenLibm,Vhex-Kernel-Core/fxlibc,Slyvtt/cZlib
-include giteapc-config.make
configure:
@ fxsdk build-fx -c
@ fxsdk build-cg -c
build:
@ fxsdk build-fx
@ fxsdk build-cg
install:
@ fxsdk build-fx install
@ fxsdk build-cg install
uninstall:
@ if [ -e build-fx/install_manifest.txt ]; then \
xargs rm -f < build-fx/install_manifest.txt; \
fi
@ if [ -e build-cg/install_manifest.txt ]; then \
xargs rm -f < build-cg/install_manifest.txt; \
fi
.PHONY: configure build install uninstall

View File

@ -1,185 +0,0 @@
/* pnglibconf.h - library build configuration */
/* libpng version 1.5.30, September 28, 2017 */
/* Copyright (c) 2011-2015 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* For conditions of distribution and use, see the disclaimer */
/* and license in png.h */
/* pnglibconf.h */
/* Machine generated file: DO NOT EDIT */
/* Derived from: scripts/pnglibconf.dfa */
#ifndef PNGLCONF_H
#define PNGLCONF_H
/* options */
#define PNG_16BIT_SUPPORTED
#define PNG_ALIGNED_MEMORY_SUPPORTED
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
#define PNG_BENIGN_ERRORS_SUPPORTED
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
#define PNG_CHECK_cHRM_SUPPORTED
#define PNG_CONSOLE_IO_SUPPORTED
#define PNG_CONVERT_tIME_SUPPORTED
#define PNG_EASY_ACCESS_SUPPORTED
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
#define PNG_ERROR_TEXT_SUPPORTED
#define PNG_FIXED_POINT_SUPPORTED
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
#define PNG_FLOATING_POINT_SUPPORTED
#define PNG_GET_PALETTE_MAX_SUPPORTED
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
#define PNG_INCH_CONVERSIONS_SUPPORTED
#define PNG_INFO_IMAGE_SUPPORTED
#define PNG_IO_STATE_SUPPORTED
#define PNG_MNG_FEATURES_SUPPORTED
#define PNG_POINTER_INDEXING_SUPPORTED
#define PNG_PROGRESSIVE_READ_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
#define PNG_READ_ALPHA_MODE_SUPPORTED
#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
#define PNG_READ_BACKGROUND_SUPPORTED
#define PNG_READ_BGR_SUPPORTED
#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
#define PNG_READ_EXPAND_16_SUPPORTED
#define PNG_READ_EXPAND_SUPPORTED
#define PNG_READ_FILLER_SUPPORTED
#define PNG_READ_GAMMA_SUPPORTED
#define PNG_READ_GET_PALETTE_MAX_SUPPORTED
#define PNG_READ_GRAY_TO_RGB_SUPPORTED
#define PNG_READ_INTERLACING_SUPPORTED
#define PNG_READ_INT_FUNCTIONS_SUPPORTED
#define PNG_READ_INVERT_ALPHA_SUPPORTED
#define PNG_READ_INVERT_SUPPORTED
#define PNG_READ_OPT_PLTE_SUPPORTED
#define PNG_READ_PACKSWAP_SUPPORTED
#define PNG_READ_PACK_SUPPORTED
#define PNG_READ_QUANTIZE_SUPPORTED
#define PNG_READ_RGB_TO_GRAY_SUPPORTED
#define PNG_READ_SCALE_16_TO_8_SUPPORTED
#define PNG_READ_SHIFT_SUPPORTED
#define PNG_READ_STRIP_16_TO_8_SUPPORTED
#define PNG_READ_STRIP_ALPHA_SUPPORTED
#define PNG_READ_SUPPORTED
#define PNG_READ_SWAP_ALPHA_SUPPORTED
#define PNG_READ_SWAP_SUPPORTED
#define PNG_READ_TEXT_SUPPORTED
#define PNG_READ_TRANSFORMS_SUPPORTED
#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
#define PNG_READ_USER_CHUNKS_SUPPORTED
#define PNG_READ_USER_TRANSFORM_SUPPORTED
#define PNG_READ_bKGD_SUPPORTED
#define PNG_READ_cHRM_SUPPORTED
#define PNG_READ_gAMA_SUPPORTED
#define PNG_READ_hIST_SUPPORTED
#define PNG_READ_iCCP_SUPPORTED
#define PNG_READ_iTXt_SUPPORTED
#define PNG_READ_oFFs_SUPPORTED
#define PNG_READ_pCAL_SUPPORTED
#define PNG_READ_pHYs_SUPPORTED
#define PNG_READ_sBIT_SUPPORTED
#define PNG_READ_sCAL_SUPPORTED
#define PNG_READ_sPLT_SUPPORTED
#define PNG_READ_sRGB_SUPPORTED
#define PNG_READ_tEXt_SUPPORTED
#define PNG_READ_tIME_SUPPORTED
#define PNG_READ_tRNS_SUPPORTED
#define PNG_READ_zTXt_SUPPORTED
#define PNG_SAVE_INT_32_SUPPORTED
#define PNG_SEQUENTIAL_READ_SUPPORTED
#define PNG_SETJMP_SUPPORTED
/*#undef PNG_SET_OPTION_SUPPORTED*/
#define PNG_SET_USER_LIMITS_SUPPORTED
#define PNG_STDIO_SUPPORTED
#define PNG_TEXT_SUPPORTED
#define PNG_TIME_RFC1123_SUPPORTED
#define PNG_UNKNOWN_CHUNKS_SUPPORTED
#define PNG_USER_CHUNKS_SUPPORTED
#define PNG_USER_LIMITS_SUPPORTED
#define PNG_USER_MEM_SUPPORTED
#define PNG_USER_TRANSFORM_INFO_SUPPORTED
#define PNG_USER_TRANSFORM_PTR_SUPPORTED
#define PNG_WARNINGS_SUPPORTED
#define PNG_WRITE_16BIT_SUPPORTED
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
#define PNG_WRITE_BGR_SUPPORTED
#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
#define PNG_WRITE_FILLER_SUPPORTED
#define PNG_WRITE_FILTER_SUPPORTED
#define PNG_WRITE_FLUSH_SUPPORTED
#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED
#define PNG_WRITE_INTERLACING_SUPPORTED
#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
#define PNG_WRITE_INVERT_SUPPORTED
#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
#define PNG_WRITE_PACKSWAP_SUPPORTED
#define PNG_WRITE_PACK_SUPPORTED
#define PNG_WRITE_SHIFT_SUPPORTED
#define PNG_WRITE_SUPPORTED
#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
#define PNG_WRITE_SWAP_SUPPORTED
#define PNG_WRITE_TEXT_SUPPORTED
#define PNG_WRITE_TRANSFORMS_SUPPORTED
#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
#define PNG_WRITE_bKGD_SUPPORTED
#define PNG_WRITE_cHRM_SUPPORTED
#define PNG_WRITE_gAMA_SUPPORTED
#define PNG_WRITE_hIST_SUPPORTED
#define PNG_WRITE_iCCP_SUPPORTED
#define PNG_WRITE_iTXt_SUPPORTED
#define PNG_WRITE_oFFs_SUPPORTED
#define PNG_WRITE_pCAL_SUPPORTED
#define PNG_WRITE_pHYs_SUPPORTED
#define PNG_WRITE_sBIT_SUPPORTED
#define PNG_WRITE_sCAL_SUPPORTED
#define PNG_WRITE_sPLT_SUPPORTED
#define PNG_WRITE_sRGB_SUPPORTED
#define PNG_WRITE_tEXt_SUPPORTED
#define PNG_WRITE_tIME_SUPPORTED
#define PNG_WRITE_tRNS_SUPPORTED
#define PNG_WRITE_zTXt_SUPPORTED
#define PNG_bKGD_SUPPORTED
#define PNG_cHRM_SUPPORTED
#define PNG_gAMA_SUPPORTED
#define PNG_hIST_SUPPORTED
#define PNG_iCCP_SUPPORTED
#define PNG_iTXt_SUPPORTED
#define PNG_oFFs_SUPPORTED
#define PNG_pCAL_SUPPORTED
#define PNG_pHYs_SUPPORTED
#define PNG_sBIT_SUPPORTED
#define PNG_sCAL_SUPPORTED
#define PNG_sPLT_SUPPORTED
#define PNG_sRGB_SUPPORTED
#define PNG_tEXt_SUPPORTED
#define PNG_tIME_SUPPORTED
#define PNG_tRNS_SUPPORTED
#define PNG_zTXt_SUPPORTED
/* end of options */
/* settings */
#define PNG_API_RULE 0
#define PNG_DEFAULT_READ_MACROS 1
#define PNG_GAMMA_THRESHOLD_FIXED 5000
#define PNG_MAX_GAMMA_8 11
#define PNG_QUANTIZE_BLUE_BITS 5
#define PNG_QUANTIZE_GREEN_BITS 5
#define PNG_QUANTIZE_RED_BITS 5
#define PNG_USER_CHUNK_CACHE_MAX 1000
#define PNG_USER_CHUNK_MALLOC_MAX 8000000
#define PNG_USER_HEIGHT_MAX 1000000
#define PNG_USER_WIDTH_MAX 1000000
#define PNG_ZBUF_SIZE 8192
#define PNG_sCAL_PRECISION 5
/* end of settings */
#endif /* PNGLCONF_H */