1
HaoLN
How to show a resized image in framework ?
  • 2005/11/15 9:28

  • HaoLN

  • Just popping in

  • Posts: 1

  • Since: 2005/11/15


I have been new to XOOPS framework,so i have some problems with that.I want to resize images and don't save resized images in my computer,when i show in framework,there're alot of binary codes(not the images i expect!!!).The function i use to resize an image and show it in framework :
function CreateThumnail($file_name)
{
// Get new sizes
header('Content-type: image/jpeg');
list($width, $height) = @getimagesize($file_name);
$newwidth = 200;
$newheight = 200;
// Load
$thumb = @imagecreate($newwidth, $newheight);
$source = @imagecreatefromjpeg($file_name);

// Resize
@imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);

// Output
@imagejpeg($thumb);
}
Who's experienced with that problem,please help me ,thanks for reading my problem

Login

Who's Online

409 user(s) are online (349 user(s) are browsing Support Forums)


Members: 0


Guests: 409


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits