mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
lodepng.c: applied patch from mainstream PR/170
marks lodepng_convert_rgb() static and only available if LODEPNG_COMPILE_ANCILLARY_CHUNKS is set.
This commit is contained in:
parent
ec57aa9731
commit
22b9b3474c
1 changed files with 5 additions and 2 deletions
|
@ -3595,6 +3595,9 @@ unsigned lodepng_convert(unsigned char* out, const unsigned char* in,
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LODEPNG_COMPILE_ENCODER
|
||||||
|
|
||||||
|
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
|
||||||
|
|
||||||
/* Converts a single rgb color without alpha from one type to another, color bits truncated to
|
/* Converts a single rgb color without alpha from one type to another, color bits truncated to
|
||||||
their bitdepth. In case of single channel (gray or palette), only the r channel is used. Slow
|
their bitdepth. In case of single channel (gray or palette), only the r channel is used. Slow
|
||||||
|
@ -3602,7 +3605,7 @@ function, do not use to process all pixels of an image. Alpha channel not suppor
|
||||||
this is for bKGD, supporting alpha may prevent it from finding a color in the palette, from the
|
this is for bKGD, supporting alpha may prevent it from finding a color in the palette, from the
|
||||||
specification it looks like bKGD should ignore the alpha values of the palette since it can use
|
specification it looks like bKGD should ignore the alpha values of the palette since it can use
|
||||||
any palette index but doesn't have an alpha channel. Idem with ignoring color key. */
|
any palette index but doesn't have an alpha channel. Idem with ignoring color key. */
|
||||||
unsigned lodepng_convert_rgb(
|
static unsigned lodepng_convert_rgb(
|
||||||
unsigned* r_out, unsigned* g_out, unsigned* b_out,
|
unsigned* r_out, unsigned* g_out, unsigned* b_out,
|
||||||
unsigned r_in, unsigned g_in, unsigned b_in,
|
unsigned r_in, unsigned g_in, unsigned b_in,
|
||||||
const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in) {
|
const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in) {
|
||||||
|
@ -3652,7 +3655,7 @@ unsigned lodepng_convert_rgb(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LODEPNG_COMPILE_ENCODER
|
#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */
|
||||||
|
|
||||||
void lodepng_color_stats_init(LodePNGColorStats* stats) {
|
void lodepng_color_stats_init(LodePNGColorStats* stats) {
|
||||||
/*stats*/
|
/*stats*/
|
||||||
|
|
Loading…
Reference in a new issue