On Oct 31, 2010, at 7:29 AM, Gary wrote:
Thanks for the reply, here is a link to the code of the page.


Ok, that was pretty messy code. But what I could glean from it is this. (See your code at http://pastie.org/1262989).

Line 238: <table border="2" cellpadding="0" width="100%" ><tr><td width="auto"><div class="WADADetailsMainImageArea"><img class="WADADetailsMainImage" style="border:#FFFFFF 6px solid" src="images/<?php echo $row_WADAimages["image_file"]; ?>" alt="<?php echo $row_WADAimages["description"]; ?>" /></div></td><td valign="top" width="25%"> <div class="WADADetailsSubHeading" style="padding-left: 15px;">This photo was taken in <?php echo $row_WADAimages["where_taken"]; ?></div>

You've got an img tag there, indicating the src of:

        images/<?php echo $row_WADAimages["image_file"]; ?>

Is this the image file you want to watermark?

The code there has me confused. Is this all one script? Or is it multiple scripts?

If it's all one script, it won't work the way you intend. The script emits data before it gets to the point where you have set up to watermark the image. Thus, the point where you call header to change the Content-type won't work. Then there is more data emitted after the image.

Am I reading this correctly? Is it all one big script?

If it is, what you really need to do, is at the point where you want the watermarked image to appear, is put out some HTML like so:

<img src="watermark.php?src=images/<?php echo $row_WADAimages["image_file"]; ?>" .. other stuff ..>

Then put that code you've got in lines 247-272 in the script watermark.php and it should work as is.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to