mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.2beta5.tar
This commit is contained in:
8
pngset.c
8
pngset.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user