mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel]
Fixed point APIs are now supported throughout (no missing APIs).
Internal fixed point arithmetic support exists for all internal floating
point operations.
sCAL validates the floating point strings it is passed.
Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2
Two new APIs exist to get the number of passes without turning on the
PNG_INTERLACE transform and to get the number of rows in the current
pass.
A new test program, pngvalid.c, validates the gamma code.
Errors in the 16 bit gamma correction (overflows) have been corrected.
cHRM chunk testing is done consistently (previously the floating point
API bypassed it, because the test really didn't work on FP, now the test
is performed on the actual values to be stored in the PNG file so it
works in the FP case too.)
Most floating point APIs now simply call the fixed point APIs after
converting the values to the fixed point form used in the PNG file.
The standard headers no longer include zlib.h, which is currently only
required for pngstruct.h and can therefore be internal.
(Patches by John Bowler)
This commit is contained in:
16
pngtest.c
16
pngtest.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* Last changed in libpng 1.5.0 [July 24, 2010]
|
||||
* Last changed in libpng 1.5.0 [July 29, 2010]
|
||||
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -31,6 +31,7 @@
|
||||
* of files at once by typing "pngtest -m file1.png file2.png ..."
|
||||
*/
|
||||
|
||||
#include "zlib.h"
|
||||
#include "png.h"
|
||||
/* Copied from pngpriv.h but only used in error messages below. */
|
||||
#ifndef PNG_ZBUF_SIZE
|
||||
@@ -64,6 +65,17 @@ typedef FILE * png_FILE_p;
|
||||
# define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */
|
||||
#endif
|
||||
|
||||
/* The code uses memcmp and memcpy on large objects (typically row pointers) so
|
||||
* it is necessary to do soemthing special on certain architectures, note that
|
||||
* the actual support for this was effectively removed in 1.4, so only the
|
||||
* memory remains in this program:
|
||||
*/
|
||||
#define CVT_PTR(ptr) (ptr)
|
||||
#define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||
#define png_memcmp memcmp
|
||||
#define png_memcpy memcpy
|
||||
#define png_memset memset
|
||||
|
||||
/* Turn on CPU timing
|
||||
#define PNGTEST_TIMING
|
||||
*/
|
||||
@@ -957,7 +969,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
{
|
||||
png_charp name;
|
||||
png_charp profile;
|
||||
png_bytep profile;
|
||||
png_uint_32 proflen;
|
||||
int compression_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user