Ver original$img2 = imagecreatefromjpeg( $_GET['img'] );$w1 = intval( imagesx( $img2 ) / 2 );$h1 = intval( imagesy( $img2 ) / 2 );$img1 = imagecreatetruecolor( $w1, $h1 );imagecopyresized( $img1, $img2, 0, 0, 0, 0, $w1, $h1, 1600, 1280 );header( "Content-type: image/jpeg" );imagejpeg( $img1 );
Ver original<html> <head> <title>Prueba</title> </head> <body> <img src="resize.php?img=http://fc02.deviantart.com/fs21/f/2007/305/4/7/Nissan_Skyline_2008_Top_Secret_by_genone.jpg" /> </body></html>