Conditionally compile functions only used by sequential readers
png_combine_row() and png_read_finish_row() are not used by progressive PNG readers.
This commit is contained in:
parent
580f4f5561
commit
5902059c7c
7
ANNOUNCE
7
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.4.0beta60 - May 16, 2009
|
Libpng 1.4.0beta60 - May 18, 2009
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -452,8 +452,11 @@ version 1.4.0beta59 [May 15, 2009]
|
|||||||
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
||||||
Added sections about the git repository and our coding style to the
|
Added sections about the git repository and our coding style to the
|
||||||
documentation
|
documentation
|
||||||
|
Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
|
||||||
|
|
||||||
version 1.4.0beta60 [May 16, 2009]
|
version 1.4.0beta60 [May 18, 2009]
|
||||||
|
Conditionally compile png_combine_row() and png_read_finish_row()
|
||||||
|
which are not used by progressive readers.
|
||||||
|
|
||||||
version 1.4.0betaN [future]
|
version 1.4.0betaN [future]
|
||||||
Build shared libraries with -lz and sometimes -lm.
|
Build shared libraries with -lz and sometimes -lm.
|
||||||
|
5
CHANGES
5
CHANGES
@ -2129,8 +2129,11 @@ version 1.4.0beta59 [May 15, 2009]
|
|||||||
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
|
||||||
Added sections about the git repository and our coding style to the
|
Added sections about the git repository and our coding style to the
|
||||||
documentation
|
documentation
|
||||||
|
Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
|
||||||
|
|
||||||
version 1.4.0beta60 [May 16, 2009]
|
version 1.4.0beta60 [May 18, 2009]
|
||||||
|
Conditionally compile png_combine_row() and png_read_finish_row()
|
||||||
|
which are not used by progressive readers.
|
||||||
|
|
||||||
version 1.4.0betaN [future]
|
version 1.4.0betaN [future]
|
||||||
Build shared libraries with -lz and sometimes -lm.
|
Build shared libraries with -lz and sometimes -lm.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [May 16, 2009]
|
* Last changed in libpng 1.4.0 [May 18, 2009]
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -2404,6 +2404,7 @@ png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
||||||
/* Combines the row recently read in with the existing pixels in the
|
/* Combines the row recently read in with the existing pixels in the
|
||||||
row. This routine takes care of alpha and transparency if requested.
|
row. This routine takes care of alpha and transparency if requested.
|
||||||
This routine also handles the two methods of progressive display
|
This routine also handles the two methods of progressive display
|
||||||
@ -2615,6 +2616,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
|
||||||
|
|
||||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
/* OLD pre-1.0.9 interface:
|
/* OLD pre-1.0.9 interface:
|
||||||
@ -2966,6 +2968,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_read_finish_row(png_structp png_ptr)
|
png_read_finish_row(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
@ -2996,7 +2999,6 @@ png_read_finish_row(png_structp png_ptr)
|
|||||||
if (png_ptr->interlaced)
|
if (png_ptr->interlaced)
|
||||||
{
|
{
|
||||||
png_ptr->row_number = 0;
|
png_ptr->row_number = 0;
|
||||||
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
png_ptr->pass++;
|
png_ptr->pass++;
|
||||||
@ -3096,6 +3098,7 @@ png_read_finish_row(png_structp png_ptr)
|
|||||||
|
|
||||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
|
||||||
|
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_read_start_row(png_structp png_ptr)
|
png_read_start_row(png_structp png_ptr)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [May 16, 2009]
|
* Last changed in libpng 1.4.0 [May 18, 2009]
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -180,19 +180,20 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
|
info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
|
||||||
info_ptr->pcal_units, info_ptr->pcal_params);
|
info_ptr->pcal_units, info_ptr->pcal_params);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_sCAL_SUPPORTED)
|
#if defined(PNG_sCAL_SUPPORTED)
|
||||||
if (info_ptr->valid & PNG_INFO_sCAL)
|
if (info_ptr->valid & PNG_INFO_sCAL)
|
||||||
#if defined(PNG_WRITE_sCAL_SUPPORTED)
|
#if defined(PNG_WRITE_sCAL_SUPPORTED)
|
||||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
||||||
png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
|
png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
|
||||||
info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
|
info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
|
||||||
#else
|
#else /* !FLOATING_POINT */
|
||||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||||
png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
|
png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
|
||||||
info_ptr->scal_s_width, info_ptr->scal_s_height);
|
info_ptr->scal_s_width, info_ptr->scal_s_height);
|
||||||
#endif /* FIXED_POINT */
|
#endif /* FIXED_POINT */
|
||||||
#endif /* FLOATING_POINT */
|
#endif /* FLOATING_POINT */
|
||||||
#else /* WRITE_sCAL */
|
#else /* !WRITE_sCAL */
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
"png_write_sCAL not supported; sCAL chunk not written");
|
"png_write_sCAL not supported; sCAL chunk not written");
|
||||||
#endif /* WRITE_sCAL */
|
#endif /* WRITE_sCAL */
|
||||||
|
Loading…
Reference in New Issue
Block a user