So the user uploads an image (jpeg, gif or png); And I should convert it to PNG, so I'm doing something like:
if ($typeImgFunction == 'jpeg') $imgCreate = imagecreatefromjpeg($fileName);
else if ($typeImgFunction == 'gif') $imgCreate = imagecreatefromgif($fileName);
else if ($typeImgFunction == 'png') $imgCreate = imagecreatefrompng($fileName);
...
...
$displayImg = imagepng($dstFinal, $src);
The problem is that the white color (#fffff) in the uploaded image become a liter white (#FEFEFE) and it's ugly..
I tried to play with the quality parameter of imagepng putting something like:
$displayImg = imagepng($dstFinal, $src, 0); // 0 for no compression at all
But really it did not change anything...
Would you guys happend to have an idea ?