Imported from libpng-1.2.2beta5.tar

This commit is contained in:
Glenn Randers-Pehrson
2002-03-25 18:49:08 -06:00
parent 377657d1d6
commit 73d57cb97b
59 changed files with 336 additions and 302 deletions

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* libpng 1.2.2beta4 - March 8, 2002
* libpng 1.2.2beta5 - March 26, 2002
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -305,9 +305,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
info_ptr->compression_type = (png_byte)compression_type;
info_ptr->filter_type = (png_byte)filter_type;
info_ptr->interlace_type = (png_byte)interlace_type;
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
info_ptr->channels = 1;
else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
info_ptr->channels = 3;
else
info_ptr->channels = 1;
@@ -688,7 +686,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
#ifdef PNG_iTXt_SUPPORTED
{
/* set iTXt data */
if (text_ptr[i].key != NULL)
if (text_ptr[i].lang != NULL)
lang_len = png_strlen(text_ptr[i].lang);
else
lang_len = 0;