Comunidad de diseño web y desarrollo en internet online

Ayuda con este script PHP - soy nuevo en esto

Citar            
MensajeEscrito el 03 Ago 2007 05:55 am
Ayuda con este script PHP - soy nuevo en esto

Es un generador de thumbnail.

Este es el Script:
<?php
$image = $HTTP_GET_VARS['image'];
$newWidth = $HTTP_GET_VARS['width'];
$newHeight = $HTTP_GET_VARS['height'];

$size = GetImageSize($image);
$width = $size[0];
$height = $size[1];

$width = $width-$newWidth;

$height = $height-$newHeight;

$x = $width/2;
$y = $height/2;

$src = ImageCreateFromJpeg($image);

$tmb = ImageCreateTrueColor($newWidth,$newHeight);

ImageCopy($tmb, $src, 0, 0, $x, $y, $newWidth, $newHeight);

header('Content-type: image/jpeg');
ImageJpeg($tmb, null, 100);

ImageDestroy($src);
ImageDestroy($tmb);
ImageDestroy($thumb);

?>

En el tutorial de donde lo baje dice que se utiliza poniendo la sig linea de html:
<img src="thumbnail.php?image=http://www.mysite.com/image.jpg&width=50&height=50" />

Me podrian dar un ejemplo de como usarlo, si le debo de quitar a esta ultimalinea la palabra image=.

Por favor ayuda.

De antemano muchas gracias
Jalejandro.

Por jalejandrocp

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 04 Ago 2007 05:13 am
:lol: Ya encontre hacerlas de otra forma :lol:



GRACIAS


Jalejandro

Por jalejandrocp

1 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.