Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/12/2007, 13:00
Avatar de asinox
asinox
 
Fecha de Ingreso: enero-2002
Ubicación: Santo Domingo
Mensajes: 2.712
Antigüedad: 22 años, 3 meses
Puntos: 6
Ayuda con WaterMark

Hola, no se como aplicar un watermark a las fotos, no veo una forma....

funcion watermark:
Código PHP:
function watermarkImage ($SourceFile$WaterMarkText$DestinationFile) {
   list(
$width$height) = getimagesize($SourceFile);
   
$image_p imagecreatetruecolor($width$height);
   
$image imagecreatefromjpeg($SourceFile);
   
imagecopyresampled($image_p$image0000$width$height$width$height);
   
$black imagecolorallocate($image_p000);
   
$font 'arial.ttf';
   
$font_size 10;
   
imagettftext($image_p$font_size01020$black$font$WaterMarkText);
   if (
$DestinationFile<>'') {
      
imagejpeg ($image_p$DestinationFile100);
   } else {
      
header('Content-Type: image/jpeg');
      
imagejpeg($image_pnull100);
   };
   
imagedestroy($image);
   
imagedestroy($image_p);
}; 
uso de la funcion:
Código PHP:
$SourceFile "photos/".$row[1];
$DestinationFile 'asinoxWater.png';
$WaterMarkText 'Copyright by Asinox';
watermarkImage ($SourceFile$WaterMarkText$DestinationFile); 

el problema donde esta?, pues que la galeria de fotos que estoy usando, es lightBox, manejada con javascript y para ver la foto "en grande" es via un link

ejemplo:
Código PHP:
<a href="photos/".$row[1]."\" class=\"highslide\" onclick=\"return hs.expand(this, {captionId: 'caption1'});\">
    <img src=\"photos/tb_"
.$row[1]."\" width=\"41\" height=\"41\">
</a> 
este es el thumb -> <img src=\"photos/tb_".$row[1]."\" width=\"41\" height=\"41\">

Entonces no veo, como pasarle la imagen a la funcion cuando haga click para ver la imagen en tamaño real (grande)

__________________
www.dataautos.com