summaryrefslogtreecommitdiff
path: root/example.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2013-07-17 19:03:02 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2013-07-17 19:43:57 -0500
commitfca68966b298acd26793d53346df6995f9f1c5cb (patch)
treea5ebcd5b23fe9faa11a7a530842ded49c28d6d25 /example.c
parenta4f7ea0d116a9672dd02675d87172480c995773b (diff)
downloadlibpng-fca68966b298acd26793d53346df6995f9f1c5cb.tar.gz
[master] Imported from libpng-1.6.3.tar
Diffstat (limited to 'example.c')
-rw-r--r--example.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/example.c b/example.c
index ee4e227bc..77d907797 100644
--- a/example.c
+++ b/example.c
@@ -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.6.0 [February 14, 2013]
+ * Last changed in libpng 1.6.3 [July 18, 2013]
* Maintained 1998-2013 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -441,9 +441,9 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
/* If we don't have another value */
else
{
- screen_gamma = 2.2; /* A good guess for a PC monitor in a dimly
- lit room */
- screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */
+ screen_gamma = PNG_DEFAULT_sRGB; /* A good guess for a PC monitor
+ in a dimly lit room */
+ screen_gamma = PNG_GAMMA_MAC_18 or 1.0; /* Good guesses for Mac systems */
}
/* Tell libpng to handle the gamma conversion for you. The final call
@@ -455,7 +455,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
int intent;
if (png_get_sRGB(png_ptr, info_ptr, &intent))
- png_set_gamma(png_ptr, screen_gamma, 0.45455);
+ png_set_gamma(png_ptr, screen_gamma, PNG_DEFAULT_sRGB);
else
{
double image_gamma;