Imported from libpng-0.98.tar

This commit is contained in:
Glenn Randers-Pehrson
1998-01-16 22:06:18 -06:00
parent 2687fcc7b5
commit c4a2ae6cac
26 changed files with 687 additions and 240 deletions

View File

@@ -1,12 +1,12 @@
/* pngset.c - storage of image information into info struct
*
* libpng 0.97
* libpng 0.98
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* January 7, 1998
* January 16, 1998
*
* The functions here are used during reads to store data from the file
* into the info struct, and during writes to store application data
@@ -213,18 +213,18 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED)
void
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, png_byte intent)
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
{
png_debug1(1, "in %s storage function\n", "sRGB");
if (info_ptr == NULL)
return;
info_ptr->srgb_intent = intent;
info_ptr->srgb_intent = (png_byte)intent;
info_ptr->valid |= PNG_INFO_sRGB;
}
void
png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
png_byte intent)
int intent)
{
#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED)
float file_gamma;
@@ -239,7 +239,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
png_set_sRGB(png_ptr, info_ptr, intent);
#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED)
file_gamma = (float).45;
file_gamma = (float).51;
png_set_gAMA(png_ptr, info_ptr, file_gamma);
#endif
@@ -269,7 +269,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
int i;
png_debug1(1, "in %s storage function\n", (png_ptr->chunk_name[0] == '\0' ?
"text" : png_ptr->chunk_name));
"text" : (png_const_charp)png_ptr->chunk_name));
if (info_ptr == NULL || num_text == 0)
return;
@@ -308,7 +308,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
png_textp textp = &(info_ptr->text[info_ptr->num_text]);
if (text_ptr[i].text == NULL)
text_ptr[i].text = "";
text_ptr[i].text = (png_charp)"";
if (text_ptr[i].text[0] == '\0')
{