Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"



PHP Snippet 1:

libpng warning: Interlace handling should be turned on when using png_read_image

PHP Snippet 2:

libpng warning: tRNS: invalid with alpha channel

libpng warning: iCCP: known incorrect sRGB profile

PHP Snippet 3:

<?php
// Create an image instance
$im = imagecreatefromgif('php.gif');

// Enable interlancing
imageinterlace($im, true);

// Save the interlaced image
imagegif($im, './php_interlaced.gif');
imagedestroy($im);
?>