Jump to content

problem with mages


corillo181

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.