php - how do i create a transparent canvas, then add transparent pngs to it? -


I need to create a transparent image, then, while maintaining image quality, connect it with transparent PNG.

How can I do this?

  imagecreatetruecolor (...); // imagecopymerge (..) processing using; Imagepng (...);  

thanks :)

My actual code for reference

  

code> $ d = getimagesize (TMP . $ This- & gt; File [0]); $ Source_height = $ d [0]; $ Source_width = $ d [1]; $ This- & gt; Canvas = image sitemap color ($ source_width * count ($ -> files), $ source_height); Imprinted Folting ($ this-> canvas, wrong); $ I = =; Forex Currency ($ this- & gt; Files as $ F) {$ dst_x = $ source_width * $ i; $ Im = imagecreatefrompng (tmp. $ F); Imagecopyresampled ($ this-> canvas, $ im, $ dst_x, $ dst_y = 0, $ src_x = 0, $ src_y = 0, $ source_width, $ source_height, $ source_width, $ source_height); $ I ++; (. $ Im, TMP $ i "png."). Imagepng; If breaking ($ i> 3); } $ Fn = TMP "Stiched_up_ $ i * $ source_width.png"; Imagesavealpha ($ this-> canvas, true); Imagepng ($ this-> canvas, $ fn);

  $ img = imagecreatetruecolor (...); Imagealphublending ($ img, false); // The rest of the code  

Comments