I’m using the image manipulation library from codeigniter to merge two images.
In short, the user uploads an image, I resize it and then I merge it to a black image (I call it a black canvas).
Once I got this image (the picture from the user and the black canvas), I merge it to a kind-of polaroid image and the result is something like this:
http://gelattina.com/result.jpg
As you can see, I’m getting the image in the right position, with the black canvas and the polaroid base. But also, I’m getting some white dots on the result image.
Do you know what is causing this? I think it is a PHP/GD2 issue or something like that. I’m not really using any other code to achieve this, it’s the basic “Image Manipulation Library” from codeigniter.
I solved this changing the following options of the method:
This way, CI will look at the point
(-1,-1)to get the pixel for transparency, but it will not find it.And remember to change the environment config to PRODUCTION, this way you prevent the error output.