boostorg / boostorg/gil

Possibility to disable (or enhance) logging from png and jpeg extensions (maybe others)

Open
#402 6 comments 0 reactions 0 assignees View on GitHub
cat/feature ext/io status/need-help
Dominant language
C++
Stars
199
Forks
171
Avg merge
1d 14h
Merged PRs (30d)
10

Description

### Is your feature request related to a problem? Please describe.

In case of error both [libjpeg](https://github.com/boostorg/gil/blob/develop/include/boost/gil/extension/io/jpeg/detail/writer_backend.hpp#L94) and [libpng](https://github.com/boostorg/gil/blob/develop/include/boost/gil/extension/io/png/detail/writer_backend.hpp#L59) will write message to stderr in contrast with [libtiff](https://github.com/boostorg/gil/blob/develop/include/boost/gil/extension/io/tiff/detail/log.hpp#L23) where can be logging turned off.

### Describe the solution you'd like

Possibility to turn off writing error messages to stderr.

### Describe alternatives you've considered

Maybe incorporate error messages from used libraries into exception error string. So instead of something like this:

stderr: `libpng error: [00][00][00][00]: invalid chunk type`
C++ exception what(): "png is invalid: iostream error"

It could be:

C++ exception what(): "png is invalid: [00][00][00][00]: invalid chunk type"

This would be nice for all extensions including tiff.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.