Output PNG images with transparency in PHP

kylem18

New Member
How do you correctly output PNG images with PHP so their shading, and other transparent effects don't fail.
CAzJQ.png
seems to be outputting as
2ss5V.png
...is there a way so this doesn't happen?I merged two images together.\[code\]<?php// Create image instances$dest = imagecreatefrompng('vinyl.png');$src = http://stackoverflow.com/questions/3876888/imagecreatefromjpeg('cover2.jpg');// Copy and mergeimagecopymerge($dest, $src, 10, 10, 0, 0, 180, 180, 100);// Output and free from memoryheader('Content-Type: image/png');imagepng($dest);imagedestroy($dest);imagedestroy($src);?>\[/code\]
 
Back
Top