Re: Suppressing warnings generated by libPNG

Cosmin Truta <[email protected]> Mon, 26 Nov 2018 00:42:03 -0500
Newsgroups gmane.comp.graphics.png.devel
Message-ID <CAAoVtZzq+1AfV6wpbaK6MLDHdVRvcCyVT-c+9_kY13A9q44f4A@mail.gmail.com>
Dinesh,

As libpng performs checks that are more and more strict, it is
reasonable to expect from v1.2.x to v1.6.x (which is a long jump over
a long period of time) that new warnings may appear.

Your suggested solution, inspecting the message in your warning
handler, is actually the correct one. It may not be robust enough over
libpng's future (considering that existing warnings may be reworded
and that new warnings may be introduced for anything that's
non-compliant) but it should be robust enough as long as you stay with
v1.6.x updates, post-1.6.35.

I hope this helps.

Sincerely,
Cosmin
On Mon, 12 Nov 2018 at 11:11, Dinesh Iyer <[email protected]> wrote:
>
> Hi team,
> I am developing an application that uses libpng for reading/writing PNG files. I am upgrading from using version 1.2.39 to 1.6.35 of the library.
>
> After this upgrade, I noticed that reading many files in my repository resulted in the warning:
> iCCP: known incorrect sRGB profile
>
> I believe this was introduced in 1.6.x.
>
> I have fixed all the PNG files that I ship with my application. However, as my users have PNG files that might suddenly result in a warning when read, is there a way I can suppress this warning when building the library?
>
> The current workaround I have is to inspect the message in my WarningHandler for this specific string and filter it out which does not appear to be a robust solution.
>
> Regards,
> Dinesh
> _______________________________________________
> png-mng-implement mailing list
> png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/png-mng-implement