Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/05/2009, 14:34
machoman112233
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: problema redimensionar imagen

Prueba algo parecido a esto...

resize.php
Código php:
Ver original
  1. $img2 = imagecreatefromjpeg( $_GET['img'] );
  2. $w1 = intval( imagesx( $img2 ) / 2 );
  3. $h1 = intval( imagesy( $img2 ) / 2 );
  4. $img1 = imagecreatetruecolor( $w1, $h1 );
  5. imagecopyresized( $img1, $img2, 0, 0, 0, 0, $w1, $h1, 1600, 1280 );
  6. header( "Content-type: image/jpeg" );
  7. imagejpeg( $img1 );

img.htm
Código html:
Ver original
  1.     <head>
  2.         <title>Prueba</title>
  3.     </head>
  4.         <body>
  5.             <img src="resize.php?img=http://fc02.deviantart.com/fs21/f/2007/305/4/7/Nissan_Skyline_2008_Top_Secret_by_genone.jpg" />
  6.         </body>
  7. </html>