mirror of
				https://git.code.sf.net/p/libpng/code.git
				synced 2025-07-10 18:04:09 +02:00 
			
		
		
		
	[libpng17] Mention dropping support for 16-bit platforms in libpng16.
Update some comments, fix example.c usage of png_set_sig_bytes().
This commit is contained in:
		
							parent
							
								
									81b1cff052
								
							
						
					
					
						commit
						1fc5345bff
					
				
							
								
								
									
										12
									
								
								example.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								example.c
									
									
									
									
									
								
							@ -271,7 +271,7 @@ void read_png(char *file_name)  /* We need to open the file */
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
   png_structp png_ptr;
 | 
					   png_structp png_ptr;
 | 
				
			||||||
   png_infop info_ptr;
 | 
					   png_infop info_ptr;
 | 
				
			||||||
   unsigned int sig_read = 0;
 | 
					   int sig_read = 0;
 | 
				
			||||||
   png_uint_32 width, height;
 | 
					   png_uint_32 width, height;
 | 
				
			||||||
   int bit_depth, color_type, interlace_type;
 | 
					   int bit_depth, color_type, interlace_type;
 | 
				
			||||||
   FILE *fp;
 | 
					   FILE *fp;
 | 
				
			||||||
@ -280,7 +280,7 @@ void read_png(char *file_name)  /* We need to open the file */
 | 
				
			|||||||
      return (ERROR);
 | 
					      return (ERROR);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#else no_open_file /* prototype 2 */
 | 
					#else no_open_file /* prototype 2 */
 | 
				
			||||||
void read_png(FILE *fp, unsigned int sig_read)  /* File is already open */
 | 
					void read_png(FILE *fp, int sig_read)  /* File is already open */
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   png_structp png_ptr;
 | 
					   png_structp png_ptr;
 | 
				
			||||||
   png_infop info_ptr;
 | 
					   png_infop info_ptr;
 | 
				
			||||||
@ -370,7 +370,7 @@ void read_png(FILE *fp, unsigned int sig_read)  /* File is already open */
 | 
				
			|||||||
    * are mutually exclusive.
 | 
					    * are mutually exclusive.
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* Tell libpng to strip 16 bit/color files down to 8 bits/color.
 | 
					   /* Tell libpng to strip 16 bits/color files down to 8 bits/color.
 | 
				
			||||||
    * Use accurate scaling if it's available, otherwise just chop off the
 | 
					    * Use accurate scaling if it's available, otherwise just chop off the
 | 
				
			||||||
    * low byte.
 | 
					    * low byte.
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
@ -466,7 +466,7 @@ void read_png(FILE *fp, unsigned int sig_read)  /* File is already open */
 | 
				
			|||||||
   }
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
 | 
					#ifdef PNG_READ_QUANTIZE_SUPPORTED
 | 
				
			||||||
   /* Quantize RGB files down to 8 bit palette or reduce palettes
 | 
					   /* Quantize RGB files down to 8-bit palette or reduce palettes
 | 
				
			||||||
    * to the number of colors available on your screen.
 | 
					    * to the number of colors available on your screen.
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
   if ((color_type & PNG_COLOR_MASK_COLOR) != 0)
 | 
					   if ((color_type & PNG_COLOR_MASK_COLOR) != 0)
 | 
				
			||||||
@ -518,7 +518,7 @@ void read_png(FILE *fp, unsigned int sig_read)  /* File is already open */
 | 
				
			|||||||
   /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
 | 
					   /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
 | 
				
			||||||
   png_set_swap_alpha(png_ptr);
 | 
					   png_set_swap_alpha(png_ptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* Swap bytes of 16 bit files to least significant byte first */
 | 
					   /* Swap bytes of 16-bit files to least significant byte first */
 | 
				
			||||||
   png_set_swap(png_ptr);
 | 
					   png_set_swap(png_ptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* Add filler (or alpha) byte (before/after each RGB triplet) */
 | 
					   /* Add filler (or alpha) byte (before/after each RGB triplet) */
 | 
				
			||||||
@ -966,7 +966,7 @@ void write_png(char *file_name /* , ... other image information ... */)
 | 
				
			|||||||
   /* Swap bytes of 16-bit files to most significant byte first */
 | 
					   /* Swap bytes of 16-bit files to most significant byte first */
 | 
				
			||||||
   png_set_swap(png_ptr);
 | 
					   png_set_swap(png_ptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* Swap bits of 1, 2, 4 bit packed pixel formats */
 | 
					   /* Swap bits of 1-bit, 2-bit, 4-bit packed pixel formats */
 | 
				
			||||||
   png_set_packswap(png_ptr);
 | 
					   png_set_packswap(png_ptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* Turn on interlace handling if you are not using png_write_image() */
 | 
					   /* Turn on interlace handling if you are not using png_write_image() */
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
libpng-manual.txt - A description on how to use and modify libpng
 | 
					libpng-manual.txt - A description on how to use and modify libpng
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 libpng version 1.7.0beta65 - August 11, 2015
 | 
					 libpng version 1.7.0beta65 - August 18, 2015
 | 
				
			||||||
 Updated and distributed by Glenn Randers-Pehrson
 | 
					 Updated and distributed by Glenn Randers-Pehrson
 | 
				
			||||||
 <glennrp at users.sourceforge.net>
 | 
					 <glennrp at users.sourceforge.net>
 | 
				
			||||||
 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
					 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
				
			||||||
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 Based on:
 | 
					 Based on:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 libpng versions 0.97, January 1998, through 1.7.0beta65 - August 11, 2015
 | 
					 libpng versions 0.97, January 1998, through 1.7.0beta65 - August 18, 2015
 | 
				
			||||||
 Updated and distributed by Glenn Randers-Pehrson
 | 
					 Updated and distributed by Glenn Randers-Pehrson
 | 
				
			||||||
 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
					 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -5006,9 +5006,9 @@ The signatures of many exported functions were changed, such that
 | 
				
			|||||||
   png_infop became png_inforp or png_const_inforp
 | 
					   png_infop became png_inforp or png_const_inforp
 | 
				
			||||||
where "rp" indicates a "restricted pointer".
 | 
					where "rp" indicates a "restricted pointer".
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The support for FAR/far types has been eliminated and the definition of
 | 
					Dropped support for 16-bit platforms. The support for FAR/far types has
 | 
				
			||||||
png_alloc_size_t is now controlled by a flag so that 'small size_t' systems
 | 
					been eliminated and the definition of png_alloc_size_t is now controlled
 | 
				
			||||||
can select it if necessary.
 | 
					by a flag so that 'small size_t' systems can select it if necessary.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Error detection in some chunks has improved; in particular the iCCP chunk
 | 
					Error detection in some chunks has improved; in particular the iCCP chunk
 | 
				
			||||||
reader now does pretty complete validation of the basic format.  Some bad
 | 
					reader now does pretty complete validation of the basic format.  Some bad
 | 
				
			||||||
@ -5317,7 +5317,7 @@ Other rules can be inferred by inspecting the libpng source.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
XVII. Y2K Compliance in libpng
 | 
					XVII. Y2K Compliance in libpng
 | 
				
			||||||
 | 
					
 | 
				
			||||||
August 11, 2015
 | 
					August 18, 2015
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Since the PNG Development group is an ad-hoc body, we can't make
 | 
					Since the PNG Development group is an ad-hoc body, we can't make
 | 
				
			||||||
an official declaration.
 | 
					an official declaration.
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										20
									
								
								libpng.3
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								libpng.3
									
									
									
									
									
								
							@ -1,4 +1,4 @@
 | 
				
			|||||||
.TH LIBPNG 3 "August 11, 2015"
 | 
					.TH LIBPNG 3 "August 18, 2015"
 | 
				
			||||||
.SH NAME
 | 
					.SH NAME
 | 
				
			||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta65
 | 
					libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta65
 | 
				
			||||||
.SH SYNOPSIS
 | 
					.SH SYNOPSIS
 | 
				
			||||||
@ -498,7 +498,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
 | 
				
			|||||||
.SH LIBPNG.TXT
 | 
					.SH LIBPNG.TXT
 | 
				
			||||||
libpng-manual.txt - A description on how to use and modify libpng
 | 
					libpng-manual.txt - A description on how to use and modify libpng
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 libpng version 1.7.0beta65 - August 11, 2015
 | 
					 libpng version 1.7.0beta65 - August 18, 2015
 | 
				
			||||||
 Updated and distributed by Glenn Randers-Pehrson
 | 
					 Updated and distributed by Glenn Randers-Pehrson
 | 
				
			||||||
 <glennrp at users.sourceforge.net>
 | 
					 <glennrp at users.sourceforge.net>
 | 
				
			||||||
 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
					 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
				
			||||||
@ -509,7 +509,7 @@ libpng-manual.txt - A description on how to use and modify libpng
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 Based on:
 | 
					 Based on:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 libpng versions 0.97, January 1998, through 1.7.0beta65 - August 11, 2015
 | 
					 libpng versions 0.97, January 1998, through 1.7.0beta65 - August 18, 2015
 | 
				
			||||||
 Updated and distributed by Glenn Randers-Pehrson
 | 
					 Updated and distributed by Glenn Randers-Pehrson
 | 
				
			||||||
 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
					 Copyright (c) 1998-2015 Glenn Randers-Pehrson
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -5504,9 +5504,9 @@ The signatures of many exported functions were changed, such that
 | 
				
			|||||||
   png_infop became png_inforp or png_const_inforp
 | 
					   png_infop became png_inforp or png_const_inforp
 | 
				
			||||||
where "rp" indicates a "restricted pointer".
 | 
					where "rp" indicates a "restricted pointer".
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The support for FAR/far types has been eliminated and the definition of
 | 
					Dropped support for 16-bit platforms. The support for FAR/far types has
 | 
				
			||||||
png_alloc_size_t is now controlled by a flag so that 'small size_t' systems
 | 
					been eliminated and the definition of png_alloc_size_t is now controlled
 | 
				
			||||||
can select it if necessary.
 | 
					by a flag so that 'small size_t' systems can select it if necessary.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Error detection in some chunks has improved; in particular the iCCP chunk
 | 
					Error detection in some chunks has improved; in particular the iCCP chunk
 | 
				
			||||||
reader now does pretty complete validation of the basic format.  Some bad
 | 
					reader now does pretty complete validation of the basic format.  Some bad
 | 
				
			||||||
@ -5815,7 +5815,7 @@ Other rules can be inferred by inspecting the libpng source.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.SH XVII. Y2K Compliance in libpng
 | 
					.SH XVII. Y2K Compliance in libpng
 | 
				
			||||||
 | 
					
 | 
				
			||||||
August 11, 2015
 | 
					August 18, 2015
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Since the PNG Development group is an ad-hoc body, we can't make
 | 
					Since the PNG Development group is an ad-hoc body, we can't make
 | 
				
			||||||
an official declaration.
 | 
					an official declaration.
 | 
				
			||||||
@ -6137,7 +6137,7 @@ possible without all of you.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
 | 
					Thanks to Frank J. T. Wojcik for helping with the documentation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Libpng version 1.7.0beta65 - August 11, 2015:
 | 
					Libpng version 1.7.0beta65 - August 18, 2015:
 | 
				
			||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 | 
					Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 | 
				
			||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 | 
					Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -6160,7 +6160,7 @@ this sentence.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
This code is released under the libpng license.
 | 
					This code is released under the libpng license.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libpng versions 1.0.7, July 1, 2000, through 1.7.0beta65, August 11, 2015, are
 | 
					libpng versions 1.0.7, July 1, 2000, through 1.7.0beta65, August 18, 2015, are
 | 
				
			||||||
Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
 | 
					Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
 | 
				
			||||||
distributed according to the same disclaimer and license as libpng-1.0.6
 | 
					distributed according to the same disclaimer and license as libpng-1.0.6
 | 
				
			||||||
with the following individuals added to the list of Contributing Authors:
 | 
					with the following individuals added to the list of Contributing Authors:
 | 
				
			||||||
@ -6254,7 +6254,7 @@ the additional disclaimers inserted at version 1.0.7.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Glenn Randers-Pehrson
 | 
					Glenn Randers-Pehrson
 | 
				
			||||||
glennrp at users.sourceforge.net
 | 
					glennrp at users.sourceforge.net
 | 
				
			||||||
August 11, 2015
 | 
					August 18, 2015
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.\" end of man page
 | 
					.\" end of man page
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -973,13 +973,13 @@ png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
 | 
					#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Asserts: minimal code in 'STABLE' builds to return control to the
 | 
					/* Affirms: minimal code in 'STABLE' builds to return control to the
 | 
				
			||||||
 * application, more verbose code followed by abort for all other builds to
 | 
					 * application via png_error(), more verbose code followed by PNG_ABORT for
 | 
				
			||||||
 * ensure that internal errors are detected.
 | 
					 * all other builds to ensure that internal errors are detected.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The code always produces a message if it is possible, regardless of the
 | 
					 * The code always produces a message if it is possible, regardless of the
 | 
				
			||||||
 * setting of PNG_ERROR_TEXT_SUPPORTED, except that in stable builds
 | 
					 * setting of PNG_ERROR_TEXT_SUPPORTED, except that in stable builds
 | 
				
			||||||
 * PNG_ERROR_TEXT_SUPPORTED is honoured.  See pngpriv.h for the calculation of
 | 
					 * PNG_ERROR_TEXT_SUPPORTED is honored.  See pngpriv.h for the calculation of
 | 
				
			||||||
 * the two control macros PNG_RELEASE_BUILD (don't abort; stable build or rc)
 | 
					 * the two control macros PNG_RELEASE_BUILD (don't abort; stable build or rc)
 | 
				
			||||||
 * and PNG_AFFIRM_TEXT (output text.)
 | 
					 * and PNG_AFFIRM_TEXT (output text.)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
				
			|||||||
@ -374,8 +374,8 @@
 | 
				
			|||||||
#  define param_deb(param) param,
 | 
					#  define param_deb(param) param,
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* The affirm mechanism results in a minimal png_error in released versions
 | 
					/* The affirm mechanism results in a minimal png_error() in released versions
 | 
				
			||||||
 * ('STABLE' versions) and a more descriptive abort in all other cases.
 | 
					 * ('STABLE' versions) and a more descriptive PNG_ABORT in all other cases.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The PNG_RELEASE_BUILD macro, defined above, controls the behavior of
 | 
					 * The PNG_RELEASE_BUILD macro, defined above, controls the behavior of
 | 
				
			||||||
 * 'affirm': if set to 1 affirm will call png_error (or png_err) rather than
 | 
					 * 'affirm': if set to 1 affirm will call png_error (or png_err) rather than
 | 
				
			||||||
@ -412,7 +412,7 @@
 | 
				
			|||||||
 * build supports an appropriate way of outputting the message.
 | 
					 * build supports an appropriate way of outputting the message.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Note that PNG_AFFIRM_TEXT is not configurable but is worked out here: this
 | 
					 * Note that PNG_AFFIRM_TEXT is not configurable but is worked out here: this
 | 
				
			||||||
 * is just the affirm code; * there's no reason to allow configuration of this
 | 
					 * is just the affirm code; there's no reason to allow configuration of this
 | 
				
			||||||
 * option.
 | 
					 * option.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define PNG_AFFIRM_TEXT (PNG_RELEASE_BUILD ?\
 | 
					#define PNG_AFFIRM_TEXT (PNG_RELEASE_BUILD ?\
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user