mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Revised example.c to illustrate use of PNG_DEFAULT_sRGB and
PNG_GAMMA_MAC_18 as parameters for png_set_gamma(). These have been available since libpng-1.5.4.
This commit is contained in:
parent
fb8831d19a
commit
67859c8fcb
9
ANNOUNCE
9
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.17rc03 - June 18, 2013
|
||||
Libpng 1.5.17rc03 - June 25, 2013
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -49,13 +49,16 @@ Version 1.5.17beta01 [June 8, 2013]
|
||||
the confusion that would result by declaring the init function even when
|
||||
it is not used, so that it will always get prefixed.
|
||||
|
||||
Version 1.5.17rc01 [June 18, 2013]
|
||||
Version 1.5.17rc01 [June 25, 2013]
|
||||
No changes.
|
||||
|
||||
Version 1.5.17rc02 [June 18, 2013]
|
||||
Revised libpng.3 so that "doclifter" can process it.
|
||||
|
||||
Version 1.5.17rc03 [June 18, 2013]
|
||||
Version 1.5.17rc03 [June 25, 2013]
|
||||
Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18
|
||||
as parameters for png_set_gamma(). These have been available since
|
||||
libpng-1.5.4.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
5
CHANGES
5
CHANGES
@ -4142,7 +4142,10 @@ Version 1.5.17rc01 [June 17, 2013]
|
||||
Version 1.5.17rc02 [June 18, 2013]
|
||||
Revised libpng.3 so that "doclifter" can process it.
|
||||
|
||||
Version 1.5.17rc03 [June 18, 2013]
|
||||
Version 1.5.17rc03 [June 25, 2013]
|
||||
Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18
|
||||
as parameters for png_set_gamma(). These have been available since
|
||||
libpng-1.5.4.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -259,9 +259,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
|
||||
@ -273,7 +273,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user