mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Make builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail).
This commit is contained in:
parent
f8dfd123e2
commit
f0fb1746b0
1
ANNOUNCE
1
ANNOUNCE
@ -538,6 +538,7 @@ Version 1.6.0beta31 [October 26, 2012]
|
|||||||
has been changed to allow an external CMS to be used. This code is
|
has been changed to allow an external CMS to be used. This code is
|
||||||
temporarily disabled until a suitable set of test cases using one or more
|
temporarily disabled until a suitable set of test cases using one or more
|
||||||
external CMS implementations have been implemented.
|
external CMS implementations have been implemented.
|
||||||
|
Make builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail).
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
1
CHANGES
1
CHANGES
@ -4290,6 +4290,7 @@ Version 1.6.0beta31 [October 26, 2012]
|
|||||||
has been changed to allow an external CMS to be used. This code is
|
has been changed to allow an external CMS to be used. This code is
|
||||||
temporarily disabled until a suitable set of test cases using one or more
|
temporarily disabled until a suitable set of test cases using one or more
|
||||||
external CMS implementations have been implemented.
|
external CMS implementations have been implemented.
|
||||||
|
Make builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail).
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@ -2004,6 +2004,7 @@ static double abserr(PNG_CONST png_modifier *pm, int in_depth, int out_depth)
|
|||||||
return pm->maxabs8;
|
return pm->maxabs8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
static double calcerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth)
|
static double calcerr(PNG_CONST png_modifier *pm, int in_depth, int out_depth)
|
||||||
{
|
{
|
||||||
/* Error in the linear composition arithmetic - only relevant when
|
/* Error in the linear composition arithmetic - only relevant when
|
||||||
@ -2120,6 +2121,7 @@ static int output_quantization_factor(PNG_CONST png_modifier *pm, int in_depth,
|
|||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_READ_GAMMA_SUPPORTED */
|
||||||
|
|
||||||
/* One modification structure must be provided for each chunk to be modified (in
|
/* One modification structure must be provided for each chunk to be modified (in
|
||||||
* fact more than one can be provided if multiple separate changes are desired
|
* fact more than one can be provided if multiple separate changes are desired
|
||||||
@ -2808,6 +2810,7 @@ srgb_modification_init(srgb_modification *me, png_modifier *pm, png_byte intent)
|
|||||||
pm->modifications = &me->this;
|
pm->modifications = &me->this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
typedef struct sbit_modification
|
typedef struct sbit_modification
|
||||||
{
|
{
|
||||||
png_modification this;
|
png_modification this;
|
||||||
@ -2874,6 +2877,7 @@ sbit_modification_init(sbit_modification *me, png_modifier *pm, png_byte sbit)
|
|||||||
me->this.next = pm->modifications;
|
me->this.next = pm->modifications;
|
||||||
pm->modifications = &me->this;
|
pm->modifications = &me->this;
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_READ_GAMMA_SUPPORTED */
|
||||||
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
||||||
|
|
||||||
/***************************** STANDARD PNG FILES *****************************/
|
/***************************** STANDARD PNG FILES *****************************/
|
||||||
|
|||||||
@ -3284,7 +3284,7 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
|
|
||||||
if (row_info->bit_depth == 8)
|
if (row_info->bit_depth == 8)
|
||||||
{
|
{
|
||||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
/* Notice that gamma to/from 1 are not necessarily inverses (if
|
/* Notice that gamma to/from 1 are not necessarily inverses (if
|
||||||
* there is an overall gamma correction). Prior to 1.5.5 this code
|
* there is an overall gamma correction). Prior to 1.5.5 this code
|
||||||
* checked the linearized values for equality; this doesn't match
|
* checked the linearized values for equality; this doesn't match
|
||||||
@ -3361,7 +3361,7 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
|
|
||||||
else /* RGB bit_depth == 16 */
|
else /* RGB bit_depth == 16 */
|
||||||
{
|
{
|
||||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
if (png_ptr->gamma_16_to_1 != NULL && png_ptr->gamma_16_from_1 != NULL)
|
if (png_ptr->gamma_16_to_1 != NULL && png_ptr->gamma_16_from_1 != NULL)
|
||||||
{
|
{
|
||||||
png_bytep sp = row;
|
png_bytep sp = row;
|
||||||
@ -3535,12 +3535,12 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
png_const_uint_16pp gamma_16_from_1 = png_ptr->gamma_16_from_1;
|
png_const_uint_16pp gamma_16_from_1 = png_ptr->gamma_16_from_1;
|
||||||
png_const_uint_16pp gamma_16_to_1 = png_ptr->gamma_16_to_1;
|
png_const_uint_16pp gamma_16_to_1 = png_ptr->gamma_16_to_1;
|
||||||
int gamma_shift = png_ptr->gamma_shift;
|
int gamma_shift = png_ptr->gamma_shift;
|
||||||
|
int optimize = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
png_bytep sp;
|
png_bytep sp;
|
||||||
png_uint_32 i;
|
png_uint_32 i;
|
||||||
png_uint_32 row_width = row_info->width;
|
png_uint_32 row_width = row_info->width;
|
||||||
int optimize = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0;
|
|
||||||
int shift;
|
int shift;
|
||||||
|
|
||||||
png_debug(1, "in png_do_compose");
|
png_debug(1, "in png_do_compose");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user