Skip to content

Commit

Permalink
jpegli: mention nbcomp in failure message (#3573)
Browse files Browse the repository at this point in the history
  • Loading branch information
mo271 committed May 13, 2024
1 parent 3133bd2 commit 13adc43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/extras/dec/jpegli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ Status DecodeJpeg(const std::vector<uint8_t>& compressed,
}
int nbcomp = cinfo.num_components;
if (nbcomp != 1 && nbcomp != 3) {
return failure("unsupported number of components in JPEG");
std::string msg =
"unsupported number of components in JPEG: " + std::to_string(nbcomp);
return failure(msg.c_str());
}
if (dparams.force_rgb) {
cinfo.out_color_space = JCS_RGB;
Expand Down

0 comments on commit 13adc43

Please sign in to comment.