corillo181 Posted November 28, 2006 Share Posted November 28, 2006 can someoen plz explain to me how to use this code all i keep getting is black boxes..i want to turn one or more picture in a directory to thumbnails for faster view, but nothing ever works..plz and thank you HELP!!![code]<?php$filename = 'images/pic.jpg';header('Content-type: image/jpeg');list($width, $height) = getimagesize($filename);$newWidth=120;$newHeight=intval($height*$newWidth/$width);$newImage=ImageCreateTrueColor($newWidth,$newHeight);imagecopyresampled($newImage,$oldImage,0,0,0,0,$newWidth,$newHeight,$width,$height);ImageJPEG($newImage,"TN"."jhon.jpg");?> [/code] Link to comment https://forums.phpfreaks.com/topic/28718-problem-with-mages/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.