Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

Ayuda hosting de imagenes

Estas en el tema de Ayuda hosting de imagenes en el foro de Sistemas de gestión de contenidos en Foros del Web. Bueno gente yo monte un script que encontre en la web para hacer un hosting de imagenes.. lo edite todo a mi gusto y cuando ...
  #1 (permalink)  
Antiguo 06/08/2010, 08:55
 
Fecha de Ingreso: octubre-2009
Mensajes: 41
Antigüedad: 14 años, 6 meses
Puntos: 0
Ayuda hosting de imagenes

Bueno gente yo monte un script que encontre en la web para hacer un hosting de imagenes.. lo edite todo a mi gusto y cuando lo instale surgio el problema... cuando subo imagenes y me muestra el link para foros, blogs, etc.. la imagen si es PNG con fondo trasparente me aparece el fondo blanco y si es gif con movimiento la imagen queda estatica...

queria saber si alguien sabe como hacer para que no quede asi..


los codigos son demaciado largos para ponerlos asique les dejo un link con el archivo para previsualizar las imagenes y el js con el que se muestran los links y todo lo demas(puede que sea esto tambien)

[URL="http://www.mediafire.com/?ck467uycprkkcyc"]http://www.mediafire.com/?ck467uycprkkcyc[/URL]
  #2 (permalink)  
Antiguo 06/08/2010, 09:13
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Tema movido desde PHP a Aplicaciones prefabricadas
  #3 (permalink)  
Antiguo 06/08/2010, 10:27
Avatar de DooBie  
Fecha de Ingreso: septiembre-2004
Mensajes: 1.101
Antigüedad: 19 años, 7 meses
Puntos: 71
Respuesta: Ayuda hosting de imagenes

Qué navegador usas? versión?
  #4 (permalink)  
Antiguo 06/08/2010, 11:31
 
Fecha de Ingreso: octubre-2009
Mensajes: 41
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: Ayuda hosting de imagenes

Estoy usando Firefox 3.6.8 y chrome 5.0
  #5 (permalink)  
Antiguo 07/08/2010, 10:32
 
Fecha de Ingreso: octubre-2009
Mensajes: 41
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: Ayuda hosting de imagenes

el problema esta en el GD alguien me diria que esta mal??

Código PHP:
<?php

require_once("../inc/config.php" ) ;
require_once(
"../inc/func.php" ) ;

// Path to the the requested file
$string "_tn.";
$referer $_SERVER['HTTP_REFERER'];
$ip $_SERVER['REMOTE_ADDR'];
$defaultImage "default.gif";
$path $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
$path_parts pathinfo($path) ;
$file_ext strtolower($path_parts['extension']) ;

if (
$file_ext == "bmp" ) {

$image ImageCreateFromBMP(file_get_contents($path)) ;

} else {
// Load the requested image
$image imagecreatefromstring(file_get_contents($path)) ;
}
$w imagesx($image) ;
$h imagesy($image) ;


if(
$watermarking=="1" ) {

if(
$w<"300" || $h<"300" ) {
$watermark imagecreatefrompng('th_watermark.png') ;
}

else {
// Load the watermark image
$watermark imagecreatefrompng('watermark.png') ;
}
$ww imagesx($watermark) ;
$wh imagesy($watermark) ;

// Merge watermark upon the original image
imagecopy($image$watermark$w-$ww$h-$wh00$ww$wh) ;

// Send the image

if ($file_ext == "bmp" ) {
header('Content-type: image/bmp') ;
imagebmp($image,$file="",$RLE=0) ;
imagedestroy($image) ;
exit() ; }
if (
$file_ext == "png" ) {
header('Content-type: image/png') ;
imagepng($image) ;
imagedestroy($image) ;
exit() ; }
if (
$file_ext == "gif" ) {
header('Content-type: image/gif') ;
imagegif($image) ;
imagedestroy($image) ;
exit() ; }

if (
$file_ext == "jpg" ) {
header('Content-type: image/jpeg') ;
imagejpeg($image) ;
imagedestroy($image) ;
exit() ;}
if (
$file_ext == "jpeg" ) {
header('Content-type: image/jpeg') ;
imagejpeg($image) ;
imagedestroy($image) ;
exit() ;}

}

// don't watermark if watermarking is disabled
if($watermarking=="0" ) {
if (
$file_ext == "bmp" ) {
header('Content-type: image/bmp') ;
imagebmp($image,$file="",$RLE=0) ;
imagedestroy($image) ;
exit() ; }
if (
$file_ext == "png" ) {
header('Content-type: image/png') ;
imagepng($image) ;
imagedestroy($image) ;
exit() ; }
if (
$file_ext == "gif" ) {
header('Content-type: image/gif') ;
imagegif($image) ;
imagedestroy($image) ;
exit() ; }
if (
$file_ext == "jpg" ) {
header('Content-type: image/jpeg') ;
imagejpeg($image) ;
imagedestroy($image) ;
exit() ;
}
if (
$file_ext == "jpeg" ) {
header('Content-type: image/jpeg') ;
imagejpeg($image) ;
imagedestroy($image) ;
exit() ;}

}
?>

Etiquetas: hosting, imagenes
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 20:01.