提交 5902059c 编写于 作者: G Glenn Randers-Pehrson

Conditionally compile functions only used by sequential readers

png_combine_row() and png_read_finish_row() are not used by progressive
PNG readers.
上级 580f4f55
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
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)
Added sections about the git repository and our coding style to the
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]
Build shared libraries with -lz and sometimes -lm.
......
......@@ -2129,8 +2129,11 @@ version 1.4.0beta59 [May 15, 2009]
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
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]
Build shared libraries with -lz and sometimes -lm.
......
/* 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
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (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
row. This routine takes care of alpha and transparency if requested.
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
/* 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 */
png_read_finish_row(png_structp png_ptr)
{
......@@ -2996,7 +2999,6 @@ png_read_finish_row(png_structp png_ptr)
if (png_ptr->interlaced)
{
png_ptr->row_number = 0;
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
do
{
png_ptr->pass++;
......@@ -3096,6 +3098,7 @@ png_read_finish_row(png_structp png_ptr)
png_ptr->mode |= PNG_AFTER_IDAT;
}
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
void /* PRIVATE */
png_read_start_row(png_structp png_ptr)
......
/* 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
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (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_units, info_ptr->pcal_params);
#endif
#if defined(PNG_sCAL_SUPPORTED)
if (info_ptr->valid & PNG_INFO_sCAL)
#if defined(PNG_WRITE_sCAL_SUPPORTED)
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
#else
#else /* !FLOATING_POINT */
#ifdef PNG_FIXED_POINT_SUPPORTED
png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
info_ptr->scal_s_width, info_ptr->scal_s_height);
#endif /* FIXED_POINT */
#endif /* FLOATING_POINT */
#else /* WRITE_sCAL */
#else /* !WRITE_sCAL */
png_warning(png_ptr,
"png_write_sCAL not supported; sCAL chunk not written");
#endif /* WRITE_sCAL */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册