Supongo que buscas como darles una marca de agua para que todos sepan que viene de tu pagina, hay varias formas de hacerlo.
Una es a cada foto que subas se la vas agregando con un editro de imagenes y las vaz guardando.
Otra es con php y yo lo hago con esto, le mandas hablar con
http://tuservidor.com/logo.php?picturename=imagen.jpg
y la imagen puede estar niveles hacia arriba por ejemplo
http://tuservidor.com/logo.php?pictu...ges/imagen.jpg
Bueno tambien ocupas una imagen png o jpg en este caso es png, para la transparencia y se debe llamar watermark.png, a continuacion la anexo y debes configurar el path directo a el archivo png por ejemplo
/var/www/html/ o c:\apache\htdocs
Yo la usaba en mi
Galeria, pero cambie de linux y ya no lo he configurado lo tenia con unas rulez de mod_rewrite.
Era Mas o menos asi
ModRewriteEngine On
RewriteRule (.*jpg) /logo.php?picturename=$1
Espero que te sirva
codigo
Código PHP:
<?
//Most coding by semisphere
//http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=4053&start=0
// A few lines by BY DJ AXION
// e-mail: [email protected]
// Enjoy this script!
######################################################################################################
## YOUR settings HERE
######################################################################################################
// watermark IMAGE settings
$watermark_width = 143; // watermark wanted width
$watermark_height = 20; // watermark wanted height
/*
NOTE
If the watermark is resized, transparency may contain lines and spots of your transparency color.
Try to put the right size from the beginning
*/
$opacity = 70; // 0 completely invisible
$margin_x = -0.1; // margin from the right in pixels (x axis)
$margin_y = 0; // margin from the bottom in pixels (y axis)
$quality = 100; // 100 is maximum quality
$watermark_image = "/var/www/html/watermark.png";
// Full path to image
$watermark_type = "PNG"; // JPEG or PNG
$transColor = array(0, 0, 0); // transparency color index in rgb
######################################################################################################
## DON'T EDIT BELLOW THIS LINE
## well, if you want to, you won't be busted ;-)
######################################################################################################
// get the file we want to watermark
$file = imagecreatefromjpeg($picturename);
// get the image details and create an image
$image_width = imagesx($file);
$image_height = imagesy($file);
$image = $file;
if (!preg_match("/thumb_/i", "$picturename"))
{
// get the watermark details, and open it
$watermark_info = getImageSize($watermark_image);
eval ("\$watermark = ImageCreateFrom$watermark_type(\$watermark_image);");
// calculate scale of watermark and create scaled watermark
$scaled_watermark = imageCreateTrueColor($watermark_width, $watermark_height);
// resize the watermark to the new scale
imageCopyResampled($scaled_watermark, $watermark, 0, 0, 0, 0, $watermark_width, $watermark_height, $watermark_info[0], $watermark_info[1]);
// set the transparent color ($transColor)
$transparentColor = imagecolorallocate ($scaled_watermark, $transColor[0],$transColor[1],$transColor[2]);
imagecolortransparent($scaled_watermark, $transparentColor);
// add the watermark to the image
ImageCopyMerge($image, $scaled_watermark, $image_width - $watermark_width - ($watermark_width * $margin_x), $image_height - $watermark_height - ($watermark_height * $margin_y), 0, 0, $watermark_info[0], $watermark_info[1], $opacity);
}
// send out a header
header("content-type:image/jpeg");
// send the image
imagejpeg($image,'',$quality);
// clean up
imagedestroy($image);
?>