[devel] Revised commentary about png_rgb_to_gray coefficents
and fixed spelling (truely -> truly) in comments.
This commit is contained in:
parent
a45ffbefb9
commit
0bc79772c8
@ -3093,6 +3093,11 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
|
||||
*
|
||||
* Y = (6968 * R + 23434 * G + 2366 * B)/32768
|
||||
*
|
||||
* Starting with libpng-1.5.4, if the image being converted has the
|
||||
* sRGB chunk, then the sRGB numbers are used by default:
|
||||
*
|
||||
* Y = 0.33000*R + 0.60000*G + 0.06000*B
|
||||
*
|
||||
* The calculation is to be done in a linear colorspace.
|
||||
*
|
||||
* Other integer coefficents can be used via png_set_rgb_to_gray().
|
||||
|
2
pngset.c
2
pngset.c
@ -99,7 +99,7 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
|
||||
* possible for 1/gamma to overflow the limit of 21474 and this means the
|
||||
* gamma value must be at least 5/100000 and hence at most 20000.0. For
|
||||
* safety the limits here are a little narrower. The values are 0.00016 to
|
||||
* 6250.0, which are truely ridiculous gammma values (and will produce
|
||||
* 6250.0, which are truly ridiculous gammma values (and will produce
|
||||
* displays that are all black or all white.)
|
||||
*/
|
||||
if (file_gamma < 16 || file_gamma > 625000000)
|
||||
|
@ -2104,7 +2104,7 @@ modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi)
|
||||
png_error(pp, "store state damaged (progressive)");
|
||||
|
||||
/* This is another Horowitz and Hill random noise generator. In this case
|
||||
* the aim is to stress the progressive reader with truely horrible variable
|
||||
* the aim is to stress the progressive reader with truly horrible variable
|
||||
* buffer sizes in the range 1..500, so a sequence of 9 bit random numbers
|
||||
* is generated. We could probably just count from 1 to 32767 and get as
|
||||
* good a result.
|
||||
|
Loading…
Reference in New Issue
Block a user