PHP imagecopy(): Setting X coordinate makes black area

I’m making a script that pulls in an image from an external URL. I am then using imagecopy() to merge the images because it is a transparent image. However, when I specify the X coordinate to be anything but 0, it creates a black area to the side of the image. Here is part of my code.

$src = imagecreatefrompng("URL...");
imagecopy($im, $src, 0, 0, 50, 18, 300, 300);

Is there any way to fix this?

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories