estoy entrando en el tema de manejo de imagenes y graficos
y por lo pronto tengo la "mision" de poner una marca de agua a una imagen
eh buscado y me eh encontrado con este codigo
Código PHP:
<?php
// Load the stamp and the photo to apply the watermark to
$stamp = imagecreatefrompng('stamp.png');
$im = imagecreatefromjpeg('photo.jpeg');
// Set the margins for the stamp and get the height/width of the stamp image
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);
// Copy the stamp image onto our photo using the margin offsets and the photo
// width to calculate positioning of the stamp.
imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));
// Output and free memory
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
Código:
ya verifique que este habilitado el manejo de GD en php y si apareceWarning: imagecreatefromjpeg(photo.jpeg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in C:\www\giina\test\chat\proteccionfoto.php on line 4 Warning: imagesx(): supplied argument is not a valid Image resource in C:\www\giina\test\chat\proteccionfoto.php on line 14 Warning: imagesy(): supplied argument is not a valid Image resource in C:\www\giina\test\chat\proteccionfoto.php on line 14 Warning: imagecopy(): supplied argument is not a valid Image resource in C:\www\giina\test\chat\proteccionfoto.php on line 14 Warning: Cannot modify header information - headers already sent by (output started at C:\www\giina\test\chat\proteccionfoto.php:4) in C:\www\giina\test\chat\proteccionfoto.php on line 17 Warning: imagepng(): supplied argument is not a valid Image resource in C:\www\giina\test\chat\proteccionfoto.php on line 18 Warning: imagedestroy(): supplied argument is not a valid Image resource in C:\www\giina\test\chat\proteccionfoto.php on line 19
Código:
eh buscado informacion y veo que las funciones son parte de GD pero todo esta en ingles y no entiendo bien su funcionamientoftp FTP support enabled gd GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.1.9 T1Lib Support enabled GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled gettext GetText Support enabled
alguien que me apoye y me oriente??
de antemano muchas Gracias!!!
un saludo!!