0

We have .NET Core application which is hosted under Linux based Docker container. System.Drawing library wasn't working here so we needed to installed libpng with command apt-get install -y --no-install-recommends libgdiplus libc6-dev.

It sorted out image problem but we can see lots of warnings in CloudWatch like libpng warning: iCCP: known incorrect sRGB profile. We also tried to set LogLevel "System.Drawing": "Error" but no luck.

Is there any way we can completely avoid this messages?

Jeeten Parmar
  • 5,568
  • 15
  • 62
  • 111

2 Answers2

0

Libpng-1.6 onwards is stricter in checking ICC profiles than previous versions. This warning is printed every time a broken png is found. This warning can be ignored and fixes will include:

1.Downgrade to an older version of libpng
2.Install imagemagick and use convert -strip to convert all .png files (script below)

A script that will change all .png files in the current directory:

for f in $(find . -type f -name "*.png")
do
echo "Processing $f ..."
convert $f -strip $f
done

More can refer to this post:

libpng warning: iCCP: known incorrect sRGB profile

Tupac
  • 2,590
  • 2
  • 6
  • 19
0

I replaced all Image process related code from System.Drawing library to MagickImage and so now, I don't need libpng.

Jeeten Parmar
  • 5,568
  • 15
  • 62
  • 111