Php: resize gif and png images with a transparent background turned black. Resize png
In the work, you need to scale some gif images and then go to Imagecopymerge. However, after using imagecreatetruecolor and imagecopyresampled, you find that the background image is incorrect. The original transparent background image turns black. Later, you can make some modifications:
$ Img = imagecreatetruecolor (0, 200,200); // 2. color $ color = imagecolorallocate ($ img, 255,255,255); // 3. set transparent imagecolortransparent ($ img, $ color); imagefill ($ img, 0, 0, $ color );
Then perform imagecopyresampled and Imagecopymerge.
In Hyun dance, the transparent ring is in GIF format. Why do I use meitu xiuxiu to convert PNG to a GIF with a black background?
The icon displayed after success. So what you see here is not transparent. By confirmation, it will not become transparent. You need to try again. Well, I 'd like to say that you don't have a basemap if you change the image format. Instead, you need to hide the basemap and change it to a transparent image format. If you don't, you can put the picture up. I can help you remove it.
Why does the background color become opaque after a PNG image is converted to a GIF image?
It depends on how you convert it. It is not possible to rename it directly. You have to save it with PS or U5 software.