Foros del Web » Programando para Internet » PHP »

php marca de agua img mysql

Estas en el tema de php marca de agua img mysql en el foro de PHP en Foros del Web. Buenas dias, yo si tengo mysql hay imagenes, pero php "marcas de agua images logo" php es muy error codigo Código HTML: <?php require_once('Connections/word.php'); ?> ...
  #1 (permalink)  
Antiguo 09/12/2014, 03:35
 
Fecha de Ingreso: abril-2013
Mensajes: 39
Antigüedad: 11 años
Puntos: 0
php marca de agua img mysql

Buenas dias, yo si tengo mysql hay imagenes, pero php "marcas de agua images logo"
php es muy error
codigo
Código HTML:
<?php require_once('Connections/word.php'); ?>
<?php
$foto = $row_foto['imagenes'];
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_foto = "-1";
if (isset($_GET['id'])) {
  $colname_foto = $_GET['id'];
}
mysql_select_db($database_word, $word);
$query_foto = sprintf("SELECT * FROM fotogranfico WHERE id = %s", GetSQLValueString($colname_foto, "int"));
$foto = mysql_query($query_foto, $word) or die(mysql_error());
$row_foto = mysql_fetch_assoc($foto);
$totalRows_foto = mysql_num_rows($foto);
?>
<?php
// Cargar la estampa y la foto para aplicarle la marca de agua
$estampa = imagecreatefrompng('imagenes/logocandemasjor.png');
$im = imagecreatefromjpeg($foto);

// Establecer los márgenes para la estampa y obtener el alto/ancho de la imagen de la estampa
$margen_dcho = 10;
$margen_inf = 10;
$sx = imagesx($estampa);
$sy = imagesy($estampa);

// Copiar la imagen de la estampa sobre nuestra foto usando los índices de márgen y el
// ancho de la foto para calcular la posición de la estampa. 
imagecopy($im, $estampa, imagesx($im) - $sx - $margen_dcho, imagesy($im) - $sy - $margen_inf, 0, 0, imagesx($estampa), imagesy($estampa));

// Imprimir y liberar memoria
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
<?php
mysql_free_result($foto);
?> 
  #2 (permalink)  
Antiguo 09/12/2014, 10:26
 
Fecha de Ingreso: agosto-2008
Ubicación: Miami, FL
Mensajes: 210
Antigüedad: 15 años, 7 meses
Puntos: 2
Respuesta: php marca de agua img mysql

perdona, pero no se entiende nada lo que dices.
Cual es la pregunta o el problema que tienes?
__________________
Se invierte mas dinero en cirugía de pechos y viagra que en la cura del Alzheimer. En unos años tendremos viejas con grandes tetas y viejos con erecciones pero que no recordarán para que sirven..

Etiquetas: agua, img, marca, mysql, select, sql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:57.