yepster123 Posted September 9, 2007 Share Posted September 9, 2007 This script merges / watermarks too images together and then saves that final image to my server. But when it saves it to the server a black line appears around the new saved image on the corners on the image. The png image before the merge didnt have the black line. How do i get rid of it. <?php header('content-type: image/png'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefrompng($_GET['src']); $size = getimagesize($_GET['src']); $dest_x = $size[0] - $watermark_width - 2; $dest_y = $size[1] - $watermark_height - 25; imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100); imagepng($image); imagepng($image, 'lightwaves.png'); ?> Quote Link to comment Share on other sites More sharing options...
btherl Posted September 18, 2007 Share Posted September 18, 2007 I don't this is a core hacking issue. It's more likely to do with the parameters you're passing to imagecopymerge() Quote Link to comment Share on other sites More sharing options...
tippy_102 Posted September 18, 2007 Share Posted September 18, 2007 I tested your code and didn't get the black line. Maybe it's you're files? If you want me to test with your files, please attached them and I'll give it a shot. Quote Link to comment Share on other sites More sharing options...
freakstyle Posted September 18, 2007 Share Posted September 18, 2007 ps... png support on IE6 is horrid. use gif Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 18, 2007 Share Posted September 18, 2007 only if you're needing alpha transparency. Png is fine except for that in ie6 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.