#211 documented default for benign error handling out of date

closed-fixed
None
5
19 hours ago
2013-06-07
Tony Cook
No

libpng-manual.txt indicates that benign errors are treated as errors by default:

Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
You can use this to handle certain errors (normally handled as errors)
as warnings.

    png_set_benign_errors (png_ptr, int allowed);

    allowed: 0: (default) treat png_benign_error() an error.
             1: treat png_benign_error() as a warning.

per CHANGES:

Version 1.6.0beta18 [March 16, 2012]
...
    Added configuration support for benign errors and changed the read
    default. Also changed some warnings in the iCCP and sRGB handling
    from to benign errors. Configuration now makes read benign
    errors warnings and write benign errors to errors by default (thus
    changing the behavior on read).  The simplified API always forces
    read benign errors to warnings (regardless of the system default, unless
    this is disabled in which case the simplified API can't be built.)

this is no longer true when reading, making the documentation out of date.

Discussion

    • status: open --> open-accepted
    • assigned_to: Glenn Randers-Pehrson
     
  • The change in 1.6.0beta18 supposedly only applied to the new "simplified api". I'll review this and fix the man page accordingly.

     
  • Revised libpng.3 and libpng-manual.txt in the libpng GIT repo, libpng16 and libpng17 branches.

     
  • Fixed in libpng-1.6.3. Thanks.

     
    • status: open-accepted --> closed-fixed