I'm currently trying to merge a jpeg (background image), and a png (border), that is mainly transparent, but has some parts that need 100% opacity.
I've worked almost all of it out, except, when it merges, there's a "white shade" over my background.
You can see what I mean here: [a href=\"http://benjrox.magazinefashion.org/img1.jpg\" target=\"_blank\"]http://benjrox.magazinefashion.org/img1.jpg[/a]
As you can see, the white is there, but is it posibal to get rid of it?
The code I have currently is:
<?php $bg_file = "/home/www/benjrox.net/myspace/images/". $_GET["img"]; $png_file = "/home/www/benjrox.net/myspace/images/bgtop.png"; $width = "1126"; $height = "562"; list($bgW, $bgH ) = getimagesize($bg_file); list($borderW, $borderH ) = getimagesize($png_file); $bgimg = ImageCreateFromJPEG($bg_file); $borderimg = ImageCreateFromPNG($png_file); ImageAlphaBlending($bgimg, true); $resized = imagecreatetruecolor( $width, $height ); imagecopyresampled( $resized, $bgimg, 0, 0, 0, 0, $width, $height, $bgW, $bgH ); ImageCopyMerge( $resized, $borderimg, 0, 0, 0, 0, $borderW, $borderH, 50); ImageJPEG($resized,FALSE,100); ImageDestroy($resized); ImageDestroy($bgimg); ImageDestroy($borderimg); ?>