Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark lodepng_convert_rgb() static #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3587,14 +3587,17 @@ unsigned lodepng_convert(unsigned char* out, const unsigned char* in,
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
their bitdepth. In case of single channel (gray or palette), only the r channel is used. Slow
function, do not use to process all pixels of an image. Alpha channel not supported on purpose:
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
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_in, unsigned g_in, unsigned b_in,
const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in) {
Expand Down Expand Up @@ -3644,7 +3647,7 @@ unsigned lodepng_convert_rgb(
return 0;
}

#ifdef LODEPNG_COMPILE_ENCODER
#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */

void lodepng_color_stats_init(LodePNGColorStats* stats) {
/*stats*/
Expand Down