[libpng15] Fixed some typos in comments.

This commit is contained in:
Glenn Randers-Pehrson 2011-11-07 23:31:34 -06:00
parent 7875d534cb
commit efc4b69767
5 changed files with 16 additions and 14 deletions

4
png.h
View File

@ -2652,7 +2652,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
* 3) Call the appropriate png_image_write... function with a pointer to the
* image to write the PNG data.
*
* png_image is a structure that describes the in-memory formant of an image
* png_image is a structure that describes the in-memory format of an image
* when it is being read or define the in-memory format of an image that you
* need to write:
*/
@ -2734,7 +2734,7 @@ typedef struct
#endif
/* Supported formats are as follows. Future versions of libpng may support more
* formats, for compatibility with older versions simply check if the format
* formats; for compatibility with older versions simply check if the format
* macro is defined using #ifdef. These defines describe the in-memory layout
* of the components of the pixels of the image.
*

View File

@ -515,7 +515,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
abs((int)((c1).green) - (int)((c2).green)) + \
abs((int)((c1).blue) - (int)((c2).blue)))
/* Added to libpng-1.5.7: sRGB convertion tables */
/* Added to libpng-1.5.7: sRGB conversion tables */
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
PNG_EXTERN /*PRIVATE*/ PNG_CONST png_uint_16 png_sRGB_table[256];
/* Convert from an sRGB encoded value 0..255 to a 16-bit linear value,

View File

@ -83,8 +83,9 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_SETJMP_SUPPORTED
/* Applications that neglect to set up their own setjmp() and then
encounter a png_error() will longjmp here. Since the jmpbuf is
then meaningless we abort instead of returning. */
* encounter a png_error() will longjmp here. Since the jmpbuf is
* then meaningless we abort instead of returning.
*/
#ifdef USE_FAR_KEYWORD
if (setjmp(tmp_jmpbuf))
#else

View File

@ -2562,7 +2562,7 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
if (row_info->bit_depth == 16)
{
png_bytep sp = row; /* source */
png_bytep dp = row; /* destinaton */
png_bytep dp = row; /* destination */
png_bytep ep = sp + row_info->rowbytes; /* end+1 */
while (sp < ep)
@ -2623,7 +2623,7 @@ png_do_chop(png_row_infop row_info, png_bytep row)
if (row_info->bit_depth == 16)
{
png_bytep sp = row; /* source */
png_bytep dp = row; /* destinaton */
png_bytep dp = row; /* destination */
png_bytep ep = sp + row_info->rowbytes; /* end+1 */
while (sp < ep)
@ -3331,7 +3331,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
if (red != green || red != blue)
rgb_error |= 1;
/* From 1.5.5 in the 16 bit case do the accurate convertion even
/* From 1.5.5 in the 16 bit case do the accurate conversion even
* in the 'fast' case - this is because this is where the code
* ends up when handling linear 16 bit data.
*/

View File

@ -493,8 +493,9 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_SETJMP_SUPPORTED
/* Applications that neglect to set up their own setjmp() and then
encounter a png_error() will longjmp here. Since the jmpbuf is
then meaningless we abort instead of returning. */
* encounter a png_error() will longjmp here. Since the jmpbuf is
* then meaningless we abort instead of returning.
*/
#ifdef USE_FAR_KEYWORD
if (setjmp(tmp_jmpbuf))
#else
@ -1709,8 +1710,8 @@ typedef struct
png_voidp local_row;
} png_image_write_control;
/* Write png_uint_16 input to a 16-bit PNG, the png_ptr has already been set to
* do any necssary byte swapped. The component order is defined by the
/* Write png_uint_16 input to a 16-bit PNG; the png_ptr has already been set to
* do any necessary byte swapping. The component order is defined by the
* png_image format value.
*/
static int
@ -1745,7 +1746,7 @@ png_write_image_16bit(png_voidp argument)
/* Work out the output row end and count over this, note that the increment
* above to 'row' means that row_end can actually be beyond the end of the
* row, this is correct.
* row; this is correct.
*/
row_end = output_row + image->width * (channels+1);
@ -1763,7 +1764,7 @@ png_write_image_16bit(png_voidp argument)
out_ptr[aindex] = alpha;
/* Calculate a reciprocal. The correct calculation is simply
* component/alpha*65535 << 15. (I.e. 15 bits of precision), this
* component/alpha*65535 << 15. (I.e. 15 bits of precision); this
* allows correct rounding by adding .5 before the shift. 'reciprocal'
* is only initialized when required.
*/