I'm trying to write a script that will copy images from one website (a supplier, in this case puma) and save them to the dealer's web server. I have already done this for other supplier's websites but puma uses png's instead of jpeg's and I believe that is what is causing my issues:
The original image looks like this:
The copied image some odd colors in the background like this:
Here is the code:
$puma_image = "http://www.pumab2b.com/_static/images/styleColors/1234560002/" . str_replace(" ", "", $Item_Num) . "_1.png";
$image = imagecreatefrompng($puma_image);
if ($image)
{
//Save image to Soccer Etc server (images folder):
if (imagepng($image, "prod_images/" . $cur_Item['Item_Num'] . ".png", 0))
{
//DO some other stuff here
}
}
I just noticed after posting the original image on this forum, that it is actually transparent. I'm guessing this has something to do with my problems?