[devel] Document the fact that png_set_dither() is no longer supported.

This commit is contained in:
Glenn Randers-Pehrson 2010-04-13 22:11:06 -05:00
parent 54ac9a918e
commit 6098807252
4 changed files with 26 additions and 14 deletions

View File

@ -2,7 +2,7 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
* Last changed in libpng 1.5.0 [April 1, 2010]
* Last changed in libpng 1.5.0 [April 14, 2010]
* This file has been placed in the public domain by the authors.
* Maintained 1998-2010 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
@ -271,6 +271,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_set_gamma(png_ptr, screen_gamma, 0.45455);
}
#ifdef PNG_READ_DITHER_SUPPORTED
/* Dither RGB files down to 8 bit palette or reduce palettes
* to the number of colors available on your screen.
*/
@ -299,6 +300,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
max_screen_colors, histogram, 0);
}
}
#endif /* PNG_READ_DITHER_SUPPORTED */
/* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr);

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.5.0beta17 - April 2, 2010
libpng version 1.5.0beta17 - April 14, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 2, 2010
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 14, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -2563,7 +2563,7 @@ Errors handled through png_error() are fatal, meaning that png_error()
should never return to its caller. Currently, this is handled via
setjmp() and longjmp() (unless you have compiled libpng with
PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
but you could change this to do things like exit() if you should wish.
but you could change this to do things like exit() if you should wish,
as long as your function does not return.
On non-fatal errors, png_warning() is called
@ -3118,6 +3118,11 @@ The png_zalloc() and png_zfree() functions are no longer exported.
The png_zalloc() function no longer zeroes out the memory that it
allocates.
Support for dithering was removed by default, because it has never
been well tested and doesn't work very well. The code has not
been removed, however, and can be enabled by building libpng with
PNG_READ_DITHER_SUPPORTED defined.
We removed the trailing '.' from the warning and error messages.
X. Detecting libpng
@ -3258,7 +3263,7 @@ Other rules can be inferred by inspecting the libpng source.
XIII. Y2K Compliance in libpng
April 2, 2010
April 14, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "April 2, 2010"
.TH LIBPNG 3 "April 14, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0beta17
.SH SYNOPSIS
@ -789,7 +789,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.5.0beta17 - April 2, 2010
libpng version 1.5.0beta17 - April 14, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -800,7 +800,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 2, 2010
libpng versions 0.97, January 1998, through 1.5.0beta17 - April 14, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -3352,7 +3352,7 @@ Errors handled through png_error() are fatal, meaning that png_error()
should never return to its caller. Currently, this is handled via
setjmp() and longjmp() (unless you have compiled libpng with
PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
but you could change this to do things like exit() if you should wish.
but you could change this to do things like exit() if you should wish,
as long as your function does not return.
On non-fatal errors, png_warning() is called
@ -3907,6 +3907,11 @@ The png_zalloc() and png_zfree() functions are no longer exported.
The png_zalloc() function no longer zeroes out the memory that it
allocates.
Support for dithering was removed by default, because it has never
been well tested and doesn't work very well. The code has not
been removed, however, and can be enabled by building libpng with
PNG_READ_DITHER_SUPPORTED defined.
We removed the trailing '.' from the warning and error messages.
.SH X. Detecting libpng
@ -4047,7 +4052,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIII. Y2K Compliance in libpng
April 2, 2010
April 14, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -4287,7 +4292,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.5.0beta17 - April 2, 2010:
Libpng version 1.5.0beta17 - April 14, 2010:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -4310,7 +4315,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta17, April 2, 2010, are
libpng versions 1.2.6, August 15, 2004, through 1.5.0beta17, April 14, 2010, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -4409,7 +4414,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
April 2, 2010
April 14, 2010
.\" end of man page

View File

@ -535,7 +535,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
png_free(png_ptr, distance);
}
}
#endif
#endif /* PNG_READ_DITHER_SUPPORTED */
#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
/* Transform the image from the file_gamma to the screen_gamma. We